]> git.ipfire.org Git - thirdparty/openssl.git/commit
Fix resource leak in crls_http_cb()
authorYZL0v3ZZ <2055877225@qq.com>
Wed, 11 Mar 2026 13:48:14 +0000 (21:48 +0800)
committerTodd Short <todd.short@me.com>
Fri, 13 Mar 2026 15:13:39 +0000 (11:13 -0400)
commit0ddb228772e4e9c4ee9b29d20d7d119e2fa66c01
treefe46ded87e6de2a761dd642caad85e557f7c4432
parentf3750d211208cc864f303cd573b45e2468d97fd9
Fix resource leak in crls_http_cb()

When the function fails to push the second CRL to the stack, it
incorrectly uses sk_X509_CRL_free() instead of sk_X509_CRL_pop_free().
This destroys the stack container but orphans previously pushed
X509_CRL objects.

Replace it with sk_X509_CRL_pop_free passing X509_CRL_free as the
cleanup routine to ensure deep deallocation of any pushed items.

Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Todd Short <todd.short@me.com>
(Merged from https://github.com/openssl/openssl/pull/30372)

(cherry picked from commit 0d2874b37a6b1da258aac81bd647fc02cbdf5547)
apps/lib/apps.c