svn rev #22237: branches/krb5-1-7/src/lib/krb5/krb/
tlyu@MIT.EDU
tlyu at MIT.EDU
Wed Apr 15 16:06:50 EDT 2009
http://src.mit.edu/fisheye/changelog/krb5/?cs=22237
Commit By: tlyu
Log Message:
ticket: 6465
tags: pullup
target_version: 1.7
version_fixed: 1.7
subject: send_tgs.c static analyzer friendliness
pull up r22002 from trunk
------------------------------------------------------------------------
r22002 | ghudson | 2009-02-13 17:00:47 -0500 (Fri, 13 Feb 2009) | 4 lines
Changed paths:
M /trunk/src/lib/krb5/krb/send_tgs.c
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 branches/krb5-1-7/src/lib/krb5/krb/send_tgs.c
Modified: branches/krb5-1-7/src/lib/krb5/krb/send_tgs.c
===================================================================
--- branches/krb5-1-7/src/lib/krb5/krb/send_tgs.c 2009-04-15 20:06:47 UTC (rev 22236)
+++ branches/krb5-1-7/src/lib/krb5/krb/send_tgs.c 2009-04-15 20:06:49 UTC (rev 22237)
@@ -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;
@@ -119,8 +119,8 @@
if (scratch != NULL && scratch->data != NULL) {
zap(scratch->data, scratch->length);
free(scratch->data);
- free(scratch);
}
+ free(scratch);
return retval;
}
More information about the cvs-krb5
mailing list