bliss: Make sure sampler exists after checking for it earlier

This commit is contained in:
Tobias Brunner
2014-12-23 15:40:01 +01:00
committed by Andreas Steffen
parent 027c19b097
commit a8e82ace8a
@@ -133,7 +133,7 @@ static bool sign_bliss_with_sha512(private_bliss_private_key_t *this,
/* Create data hash */ /* Create data hash */
hasher = lib->crypto->create_hasher(lib->crypto, HASH_SHA512); hasher = lib->crypto->create_hasher(lib->crypto, HASH_SHA512);
if (!hasher ) if (!hasher)
{ {
return FALSE; return FALSE;
} }
@@ -384,7 +384,7 @@ static bool sign_bliss_with_sha512(private_bliss_private_key_t *this,
end: end:
/* cleanup */ /* cleanup */
sampler->destroy(sampler); DESTROY_IF(sampler);
hasher->destroy(hasher); hasher->destroy(hasher);
sig->destroy(sig); sig->destroy(sig);
fft->destroy(fft); fft->destroy(fft);