s4-heimdal: fixed a use-after-free heimdal bug
authorAndrew Tridgell <tridge@samba.org>
Tue, 8 Dec 2009 04:15:41 +0000 (15:15 +1100)
committerAndrew Tridgell <tridge@samba.org>
Tue, 8 Dec 2009 04:16:13 +0000 (15:16 +1100)
This caused samba4kinit to segfault on some systems

source4/heimdal/lib/krb5/init_creds_pw.c

index 5363d533e732bd184273bdc0d1e36bd4350531c7..b615f5340a3931149dc7452c11afdb865b0a3fa6 100644 (file)
@@ -1463,6 +1463,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)