Skip to content

Commit 6893082

Browse files
committed
Free allocated altname zval in the case of an error
1 parent 72259f3 commit 6893082

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ext/openssl/openssl.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1163,6 +1163,10 @@ PHP_FUNCTION(openssl_x509_parse)
11631163

11641164
err_subitem:
11651165
zval_ptr_dtor(&subitem);
1166+
if (altname != NULL) {
1167+
zval_ptr_dtor(altname);
1168+
efree(altname);
1169+
}
11661170
err:
11671171
zend_array_destroy(Z_ARR_P(return_value));
11681172
if (cert_str) {

0 commit comments

Comments
 (0)