newhope: Properly release allocated arrays if RNG can't be created

This commit is contained in:
Tobias Brunner
2016-10-14 15:24:04 +02:00
parent b9c4b15a53
commit d3beae1311
@@ -464,7 +464,7 @@ METHOD(diffie_hellman_t, set_other_public_value, bool,
if (!rng) if (!rng)
{ {
DBG1(DBG_LIB, "could not instatiate random source"); DBG1(DBG_LIB, "could not instatiate random source");
return FALSE; goto end;
} }
if (!rng->get_bytes(rng, seed_len, noise_seed.ptr)) if (!rng->get_bytes(rng, seed_len, noise_seed.ptr))
{ {