From ab157777e37be8377ce675b5a176b001813fc792 Mon Sep 17 00:00:00 2001 From: Arne Welzel Date: Mon, 23 Oct 2023 16:39:09 +0200 Subject: [PATCH] X509Common/SCT parsing: Fix memory leak in error case Failed to free the copy of the OCSP extension's value the inner octet string couldn't be parsed. --- src/file_analysis/analyzer/x509/X509Common.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/file_analysis/analyzer/x509/X509Common.cc b/src/file_analysis/analyzer/x509/X509Common.cc index 339894a94e..47c11a4d7e 100644 --- a/src/file_analysis/analyzer/x509/X509Common.cc +++ b/src/file_analysis/analyzer/x509/X509Common.cc @@ -209,6 +209,7 @@ void X509Common::ParseSignedCertificateTimestamps(X509_EXTENSION* ext) ext_val->length); if ( ! inner ) { + OPENSSL_free(ext_val_second_pointer); reporter->Error( "X509::ParseSignedCertificateTimestamps could not parse inner octet string"); return;