svn rev #23371: trunk/src/lib/crypto/krb/

ghudson@MIT.EDU ghudson at MIT.EDU
Fri Nov 27 16:15:53 EST 2009


http://src.mit.edu/fisheye/changelog/krb5/?cs=23371
Commit By: ghudson
Log Message:
Allow null keys to be referenced (a no-op) for simpler "copying" of
keys which might or might not exist.  Consistent with allowing freeing
of null keys.



Changed Files:
U   trunk/src/lib/crypto/krb/key.c
Modified: trunk/src/lib/crypto/krb/key.c
===================================================================
--- trunk/src/lib/crypto/krb/key.c	2009-11-27 21:14:03 UTC (rev 23370)
+++ trunk/src/lib/crypto/krb/key.c	2009-11-27 21:15:53 UTC (rev 23371)
@@ -62,7 +62,8 @@
 void KRB5_CALLCONV
 krb5_k_reference_key(krb5_context context, krb5_key key)
 {
-    key->refcount++;
+    if (key)
+	key->refcount++;
 }
 
 /* Free the memory used by a krb5_key. */




More information about the cvs-krb5 mailing list