]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
list_provider_info(): Fix leak on error
authorTomas Mraz <tomas@openssl.org>
Thu, 11 Apr 2024 15:49:53 +0000 (17:49 +0200)
committerTomas Mraz <tomas@openssl.org>
Mon, 15 Apr 2024 07:11:09 +0000 (09:11 +0200)
Fixes #24110

Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/24117)

(cherry picked from commit 993c2407d04956ffdf9b32cf0a7e4938ace816dc)

apps/list.c

index 0fcbcbb083cbbce073707308c227c619bb22cec9..ad5f45742c04eb77892803c377d0d505a560edad 100644 (file)
@@ -1230,6 +1230,7 @@ static void list_provider_info(void)
     }
 
     if (OSSL_PROVIDER_do_all(NULL, &collect_providers, providers) != 1) {
+        sk_OSSL_PROVIDER_free(providers);
         BIO_printf(bio_err, "ERROR: Memory allocation\n");
         return;
     }