]> git.ipfire.org Git - thirdparty/krb5.git/commit
Fix princflags memory management 295/head
authorTom Yu <tlyu@mit.edu>
Mon, 13 Jul 2015 22:05:35 +0000 (18:05 -0400)
committerTom Yu <tlyu@mit.edu>
Thu, 16 Jul 2015 17:11:26 +0000 (13:11 -0400)
commitdd5f948614b6662fc40dc8de3f567078cfe6295e
tree12e73093ad786dc914e330ab46b44155987dea5e
parent1c12dd592804321f4752ed08e2ec02689aab004c
Fix princflags memory management

Fix some out of memory error cases (found by Coverity) that could
cause multiple frees or freeing of invalid pointers.  In
krb5_flagnum_to_string(), don't assume that asprintf() stores a null
pointer on failure (it does in BSD but not in glibc).  In
krb5_flags_to_strings(), free the correct pointer in the cleanup loop
in on error.

ticket: 8215
src/lib/kadm5/str_conv.c
src/tests/t_princflags.py