libads: Fix free of uninitialized pointer
commitdf91bc5159b24f6f10fd9742b49192921d51f821
authorUri Simchoni <urisimchoni@gmail.com>
Sat, 2 May 2015 10:44:52 +0000 (2 13:44 +0300)
committerJeremy Allison <jra@samba.org>
Mon, 4 May 2015 16:24:21 +0000 (4 18:24 +0200)
tree16d79611bf972d46e424cb4ae23c4194c4240a70
parent9343386b91c3de6b5f238169d34390afc1ee069f
libads: Fix free of uninitialized pointer

In ads_keytab_creat_default(), if the keytab to be created cannot
be opened, the bail-out code calls smb_krb5_kt_free_entry() on
an uninitialized entry.

To reproduce:
1. Join a domain
2. KRB5_KTNAME=FILE:/non-existant-path/krb5.keytab net ads keytab create -P

Signed-off-by: Uri Simchoni <urisimchoni@gmail.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
source3/libads/kerberos_keytab.c