Make sure hasher exists before trying to destroy it
authorTobias Brunner <tobias@strongswan.org>
Fri, 28 Sep 2012 18:57:12 +0000 (20:57 +0200)
committerTobias Brunner <tobias@strongswan.org>
Fri, 28 Sep 2012 18:57:12 +0000 (20:57 +0200)
src/libpts/plugins/imv_attestation/attest_db.c

index 750a27b..55afbf7 100644 (file)
@@ -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)