Skip to content

Commit 1a7f2d6

Browse files
committed
Free altname if not using it
1 parent 0fb9a8c commit 1a7f2d6

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
@@ -1563,6 +1563,8 @@ PHP_FUNCTION(openssl_x509_parse)
15631563
ulong altcount = zend_hash_num_elements(Z_ARRVAL_P(&altname));
15641564
if (altcount > 0) {
15651565
add_assoc_zval(return_value, "subjectAlternativeName", &altname);
1566+
} else {
1567+
zval_ptr_dtor(&altname);
15661568
}
15671569
if (cert_str) {
15681570
X509_free(cert);

0 commit comments

Comments
 (0)