diff options
Diffstat (limited to 'package/keyutils/keyutils-02-another-memleak.patch')
-rw-r--r-- | package/keyutils/keyutils-02-another-memleak.patch | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/package/keyutils/keyutils-02-another-memleak.patch b/package/keyutils/keyutils-02-another-memleak.patch new file mode 100644 index 000000000..f74fd79ba --- /dev/null +++ b/package/keyutils/keyutils-02-another-memleak.patch @@ -0,0 +1,32 @@ +Patch vampirised from Debian's packaging of keyutils-1.4 + +Author: Michael Gebetsroither <gebi@grml.org> +Description: Fixed another memleak (Closes: #496466). + +diff -Naurp keyutils.orig/keyutils.c keyutils/keyutils.c +--- keyutils.orig/keyutils.c 2008-08-09 21:46:52.000000000 +0200 ++++ keyutils/keyutils.c 2008-08-25 13:38:25.000000000 +0200 +@@ -187,8 +187,10 @@ int keyctl_describe_alloc(key_serial_t i + + for (;;) { + ret = keyctl_describe(id, buf, buflen); +- if (ret < 0) ++ if (ret < 0) { ++ free(buf); + return -1; ++ } + + if (buflen >= ret) + break; +@@ -226,8 +228,10 @@ int keyctl_read_alloc(key_serial_t id, v + + for (;;) { + ret = keyctl_read(id, buf, buflen); +- if (ret < 0) ++ if (ret < 0) { ++ free(buf); + return -1; ++ } + + if (buflen >= ret) + break; |