From 8eeed664401480020cae5b738fcbeb19704d8c19 Mon Sep 17 00:00:00 2001 From: Patrick McCarty Date: Fri, 12 Aug 2016 10:58:07 -0700 Subject: [PATCH] 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 --- src/signature.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/signature.c b/src/signature.c index 4e37e799..7d37e942 100644 --- a/src/signature.c +++ b/src/signature.c @@ -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; }