s4-heimdal: fixed a use-after-free heimdal bug
authorAndrew Tridgell <tridge@samba.org>
Mon, 7 Dec 2009 17:15:41 +0000 (04:15 +1100)
committerLove Hornquist Astrand <lha@h5l.org>
Tue, 8 Dec 2009 04:50:31 +0000 (20:50 -0800)
s4-heimdal: fixed a use-after-free heimdal bug

This caused samba4kinit to segfault on some systems

Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
lib/krb5/init_creds_pw.c

index c910fea13f6abc657282179614cad3b279379192..eb3373494786641ce80075f43187af921936a310 100644 (file)
@@ -1541,6 +1541,7 @@ krb5_init_creds_set_keytab(krb5_context context,
            /* remove old list of etype */
            if (etypes)
                free(etypes);
+           etypes = NULL;
            netypes = 0;
            kvno = entry.vno;
        } else if (entry.vno != kvno)