[krbdev.mit.edu #6284] memory leaks in error conditions
Greg Hudson via RT
rt-comment at krbdev.mit.edu
Thu Jan 22 14:10:23 EST 2009
First patch looks fine; I adapted it to the current code (which was
changed fairly heavily by Luke) and will commit shortly.
I don't understand the second patch. The first hunk appears to be for
Apple-specific code, so I'm ignoring that. The other hunks move a
free(reply.enc_part.ciphertext.data) into the errorout label. But (a)
that move seems unnecessary, since in the old location the data was
freed immediately after it was allocated (i.e. on successful return from
krb5_encode_kdc_rep), and (b) that move seems incorrect, since "goto
errout" can happen in cases where reply.enc_part.ciphertext.data hasn't
been initialized.
More information about the krb5-bugs
mailing list