heimdal: Fix CID 1273430 Double free
commit90d03a65bcb2aae262ad113da420ae63bdf5b4b1
authorVolker Lendecke <vl@samba.org>
Thu, 5 Mar 2015 20:17:31 +0000 (5 21:17 +0100)
committerDavid Disseldorp <ddiss@samba.org>
Fri, 6 Mar 2015 16:38:09 +0000 (6 17:38 +0100)
tree858c2dd85c38b56d7cbbe54fee34543b4fefc2de
parent87b7a7dbaa28b29dac316b8b6d953c231529e372
heimdal: Fix CID 1273430 Double free

I think Coverity is right here: Before the preceding call to
krb5_make_principal we already krb5_free_principal(ctx, tmp_creds.server)
without wiping out tmp_creds.server. The call to krb5_make_principal only
stores something fresh when it also returns 0 a.k.a. success.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Fri Mar  6 17:38:09 CET 2015 on sn-devel-104
source4/heimdal/lib/krb5/get_cred.c