really free memory too

This commit is contained in:
Love Hornquist Astrand
2010-10-27 22:13:04 -07:00
parent b7ac4c9333
commit 6d47c862ec

View File

@@ -119,14 +119,14 @@ ltm_dh_generate_key(DH *dh)
res = mp_exptmod(&g, &priv_key, &p, &pub); res = mp_exptmod(&g, &priv_key, &p, &pub);
mp_zero(&priv_key); mp_clear(&priv_key);
mp_zero(&g); mp_clear(&g);
mp_zero(&p); mp_clear(&p);
if (res != 0) if (res != 0)
continue; continue;
dh->pub_key = mpz2BN(&pub); dh->pub_key = mpz2BN(&pub);
mp_zero(&pub); mp_clear(&pub);
if (dh->pub_key == NULL) if (dh->pub_key == NULL)
return 0; return 0;