Skip to content

Commit

Permalink
Merge branch 'PHP-7.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
bwoebi committed Oct 12, 2017
2 parents 4960c41 + ee36507 commit 2392010
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions ext/openssl/openssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -2294,7 +2294,6 @@ PHP_FUNCTION(openssl_x509_parse)
{
zval * zcert;
X509 * cert = NULL;
zend_resource *certresource = NULL;
int i, sig_nid;
zend_bool useshortnames = 1;
char * tmpstr;
Expand All @@ -2314,7 +2313,7 @@ PHP_FUNCTION(openssl_x509_parse)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "z|b", &zcert, &useshortnames) == FAILURE) {
return;
}
cert = php_openssl_x509_from_zval(zcert, 0, &certresource);
cert = php_openssl_x509_from_zval(zcert, 0, NULL);
if (cert == NULL) {
RETURN_FALSE;
}
Expand Down Expand Up @@ -2430,9 +2429,6 @@ PHP_FUNCTION(openssl_x509_parse)
add_assoc_stringl(&subitem, extname, bio_buf->data, bio_buf->length);
} else {
zval_dtor(return_value);
if (certresource == NULL && cert) {
X509_free(cert);
}
BIO_free(bio_out);
RETURN_FALSE;
}
Expand All @@ -2446,10 +2442,6 @@ PHP_FUNCTION(openssl_x509_parse)
BIO_free(bio_out);
}
add_assoc_zval(return_value, "extensions", &subitem);

if (certresource == NULL && cert) {
X509_free(cert);
}
}
/* }}} */

Expand Down

0 comments on commit 2392010

Please sign in to comment.