Skip to content

Commit 4ce6b6d

Browse files
committed
Free allocated altname zval in the case of an error
1 parent 904ce7d commit 4ce6b6d

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

ext/openssl/openssl.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1570,6 +1570,10 @@ PHP_FUNCTION(openssl_x509_parse)
15701570
err_subitem:
15711571
zval_ptr_dtor(&subitem);
15721572
zval_ptr_dtor(&critext);
1573+
if (altname != NULL) {
1574+
zval_ptr_dtor(altname);
1575+
efree(altname);
1576+
}
15731577
err:
15741578
zend_array_destroy(Z_ARR_P(return_value));
15751579
if (cert_str) {

0 commit comments

Comments
 (0)