]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
free allocated module name. Reported by Sam Varshavchik.
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Thu, 23 Feb 2012 07:39:37 +0000 (08:39 +0100)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Thu, 23 Feb 2012 07:43:22 +0000 (08:43 +0100)
NEWS
lib/pkcs11.c

diff --git a/NEWS b/NEWS
index 89c11cdbf3197dd3ff59dcbe0def289796e56e29..e14d96ebd071a3a56ed5c9f6710894166af260e4 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -12,6 +12,9 @@ certificate list. Reported by Remi Gacogne.
 
 ** libgnutls: cryptodev code corrected.
 
+** libgnutls: Eliminated memory leak in PCKS #11 initialization.
+Report and fix by Sam Varshavchik.
+
 ** API and ABI modifications:
 No changes since last version.
 
index f3d2fb2098456ea0b6f695b620a43a15cfe34d70..40bcb66ee9c7256943177726fa48de2f3ea219d0 100644 (file)
@@ -487,7 +487,7 @@ static int
 initialize_automatic_p11_kit (void)
 {
   struct ck_function_list **modules;
-  const char *name;
+  char *name;
   ck_rv_t rv;
   int i, ret;
 
@@ -512,6 +512,7 @@ initialize_automatic_p11_kit (void)
           gnutls_assert ();
           _gnutls_debug_log ("Cannot add registered module: %s\n", name);
         }
+      free(name);
     }
 
   free (modules);