Skip to content

Commit 250c526

Browse files
committed
Free critext if it is not used.
1 parent 0fbcca2 commit 250c526

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

ext/openssl/openssl.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1158,6 +1158,8 @@ PHP_FUNCTION(openssl_x509_parse)
11581158
add_assoc_zval(return_value, "extensions", &subitem);
11591159
if (critcount > 0) {
11601160
add_assoc_zval(return_value, "criticalExtensions", &critext);
1161+
} else {
1162+
zval_ptr_dtor(&critext);
11611163
}
11621164
if (cert_str) {
11631165
X509_free(cert);

0 commit comments

Comments
 (0)