Fix segfault in certificate verify error path

The X509_STORE_free() function is called in terminate_signature()
already, so avoid the double frees from calling it twice. Also,
X509_LOOKUP_free() is already called by X509_STORE_free(), so it must
not be called here.

Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
This commit is contained in:
Patrick McCarty
2016-08-22 16:43:29 -07:00
committed by Tudor Marcu
parent 6dce6e89fe
commit 8eeed66440
-6
View File
@@ -359,12 +359,6 @@ static bool validate_certificate(void)
error:
ERR_print_errors_fp(stderr);
if (store) {
X509_STORE_free(store);
}
if (lookup) {
X509_LOOKUP_free(lookup);
}
return false;
}