mirror of
https://github.com/clearlinux/swupd-client.git
synced 2026-09-07 22:21:32 +00:00
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:
committed by
Tudor Marcu
parent
6dce6e89fe
commit
8eeed66440
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user