svn rev #22002: trunk/src/lib/krb5/krb/
ghudson@MIT.EDU
ghudson at MIT.EDU
Fri Feb 13 17:00:47 EST 2009
http://src.mit.edu/fisheye/changelog/krb5/?cs=22002
Commit By: ghudson
Log Message:
In tgs_construct_tgsreq, free scratch even if scratch->data is NULL.
(Which probably can't happen, but static analyzers don't know that.)
Also protect scratch from being freed before initialization.
Changed Files:
U trunk/src/lib/krb5/krb/send_tgs.c
Modified: trunk/src/lib/krb5/krb/send_tgs.c
===================================================================
--- trunk/src/lib/krb5/krb/send_tgs.c 2009-02-13 19:02:14 UTC (rev 22001)
+++ trunk/src/lib/krb5/krb/send_tgs.c 2009-02-13 22:00:47 UTC (rev 22002)
@@ -55,7 +55,7 @@
krb5_checksum checksum;
krb5_authenticator authent;
krb5_ap_req request;
- krb5_data * scratch;
+ krb5_data * scratch = NULL;
krb5_data * toutbuf;
checksum.contents = NULL;
/* Generate subkey*/
@@ -123,8 +123,8 @@
if (scratch != NULL && scratch->data != NULL) {
zap(scratch->data, scratch->length);
free(scratch->data);
- free(scratch);
}
+ free(scratch);
if (*subkey && retval != 0) {
krb5_free_keyblock(context, *subkey);
More information about the cvs-krb5
mailing list