Make sure hasher exists before trying to destroy it

This commit is contained in:
Tobias Brunner
2012-09-28 20:57:12 +02:00
parent 2a43350334
commit 31cc325fce
@@ -1182,7 +1182,7 @@ METHOD(attest_db_t, add, bool,
if (!measurements)
{
printf("file measurement failed\n");
hasher->destroy(hasher);
DESTROY_IF(hasher);
return FALSE;
}
if (this->fid && this->relative)