svn rev #22949: trunk/src/lib/crypto/ builtin/arcfour/ krb/ openssl/arcfour/

ghudson@MIT.EDU ghudson at MIT.EDU
Mon Oct 19 22:07:23 EDT 2009


http://src.mit.edu/fisheye/changelog/krb5/?cs=22949
Commit By: ghudson
Log Message:
Fix memory leaks in enc-perf work.


Changed Files:
U   trunk/src/lib/crypto/builtin/arcfour/arcfour.c
U   trunk/src/lib/crypto/krb/key.c
U   trunk/src/lib/crypto/openssl/arcfour/arcfour.c
Modified: trunk/src/lib/crypto/builtin/arcfour/arcfour.c
===================================================================
--- trunk/src/lib/crypto/builtin/arcfour/arcfour.c	2009-10-20 00:48:46 UTC (rev 22948)
+++ trunk/src/lib/crypto/builtin/arcfour/arcfour.c	2009-10-20 02:07:22 UTC (rev 22949)
@@ -186,6 +186,7 @@
   free(d3.data);
   free(salt.data);
   free(plaintext.data);
+  krb5_k_free_key(NULL, k3key);
   return (ret);
 }
 

Modified: trunk/src/lib/crypto/krb/key.c
===================================================================
--- trunk/src/lib/crypto/krb/key.c	2009-10-20 00:48:46 UTC (rev 22948)
+++ trunk/src/lib/crypto/krb/key.c	2009-10-20 02:07:22 UTC (rev 22949)
@@ -77,10 +77,12 @@
     /* Free the derived key cache. */
     while ((dk = key->derived) != NULL) {
 	key->derived = dk->next;
+	free(dk->constant.data);
 	krb5_k_free_key(context, dk->dkey);
 	free(dk);
     }
     krb5int_c_free_keyblock_contents(context, &key->keyblock);
+    free(key);
 }
 
 /* Retrieve a copy of the keyblock from a krb5_key. */

Modified: trunk/src/lib/crypto/openssl/arcfour/arcfour.c
===================================================================
--- trunk/src/lib/crypto/openssl/arcfour/arcfour.c	2009-10-20 00:48:46 UTC (rev 22948)
+++ trunk/src/lib/crypto/openssl/arcfour/arcfour.c	2009-10-20 02:07:22 UTC (rev 22949)
@@ -187,6 +187,7 @@
   free(d3.data);
   free(salt.data);
   free(plaintext.data);
+  krb5_k_free_key(NULL, k3key);
   return (ret);
 }
 




More information about the cvs-krb5 mailing list