Skip to content

Commit 57e17e5

Browse files
committed
Fix leak in openssl_cms_read()
1 parent cd3f42f commit 57e17e5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

ext/openssl/openssl.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5789,6 +5789,12 @@ PHP_FUNCTION(openssl_cms_read)
57895789
if (cms != NULL) {
57905790
CMS_ContentInfo_free(cms);
57915791
}
5792+
if (certs != NULL) {
5793+
sk_X509_pop_free(certs, X509_free);
5794+
}
5795+
if (crls != NULL) {
5796+
sk_X509_CRL_pop_free(crls, X509_CRL_free);
5797+
}
57925798
}
57935799
/* }}} */
57945800

0 commit comments

Comments
 (0)