Skip to content

Commit b2f67ff

Browse files
committed
Free altname if not using it
1 parent 060387e commit b2f67ff

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
@@ -1155,6 +1155,8 @@ PHP_FUNCTION(openssl_x509_parse)
11551155
zend_long altcount = zend_hash_num_elements(Z_ARRVAL_P(&altname));
11561156
if (altcount > 0) {
11571157
add_assoc_zval(return_value, "subjectAlternativeName", &altname);
1158+
} else {
1159+
zval_ptr_dtor(&altname);
11581160
}
11591161
if (cert_str) {
11601162
X509_free(cert);

0 commit comments

Comments
 (0)