(Which probably can't happen, but static analyzers don't know that.)
Also protect scratch from being freed before initialization.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22002
dc483132-0cff-0310-8789-
dd5450dbe970
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*/
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);