svn rev #21846: trunk/src/lib/crypto/

raeburn@MIT.EDU raeburn at MIT.EDU
Fri Jan 30 19:49:55 EST 2009


http://src.mit.edu/fisheye/changelog/krb5/?cs=21846
Commit By: raeburn
Log Message:
handle freeing null keyblock


Changed Files:
U   trunk/src/lib/crypto/keyblocks.c
Modified: trunk/src/lib/crypto/keyblocks.c
===================================================================
--- trunk/src/lib/crypto/keyblocks.c	2009-01-31 00:39:51 UTC (rev 21845)
+++ trunk/src/lib/crypto/keyblocks.c	2009-01-31 00:49:53 UTC (rev 21846)
@@ -69,11 +69,11 @@
 }
 
 void 
-krb5int_c_free_keyblock_contents(krb5_context context, register krb5_keyblock *key)
+krb5int_c_free_keyblock_contents(krb5_context context, krb5_keyblock *key)
 {
-     if (key->contents) {
-       krb5int_zap_data (key->contents, key->length);
-	  free(key->contents);
-	  key->contents = 0;
-     }
+    if (key && key->contents) {
+	krb5int_zap_data (key->contents, key->length);
+	free(key->contents);
+	key->contents = 0;
+    }
 }




More information about the cvs-krb5 mailing list