use after free

This commit is contained in:
Love Hornquist Astrand
2012-11-27 21:08:37 -08:00
parent 353ac10863
commit ed87e9b33a

View File

@@ -108,8 +108,10 @@ ltm_dh_generate_key(DH *dh)
return 0;
}
}
if (dh->pub_key)
if (dh->pub_key) {
BN_free(dh->pub_key);
dh->pub_key = NULL;
}
mp_init_multi(&pub, &priv_key, &g, &p, NULL);