diff options
author | Bob Weinand <bobwei9@hotmail.com> | 2017-10-12 12:32:49 +0200 |
---|---|---|
committer | Bob Weinand <bobwei9@hotmail.com> | 2017-10-12 12:32:49 +0200 |
commit | 2392010af440583ff44b83b30685c63d21208abd (patch) | |
tree | dd3131fc663956e6c575522bb2227eb4a7929846 | |
parent | 4960c41e1f6345d8f0200b287eeba84117e1b511 (diff) | |
parent | ee3650742389883f0f3e4d4d009c236dab13bb7d (diff) | |
download | php-git-2392010af440583ff44b83b30685c63d21208abd.tar.gz |
Merge branch 'PHP-7.2'
-rw-r--r-- | ext/openssl/openssl.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c index ce201d8340..d78c955a1a 100644 --- a/ext/openssl/openssl.c +++ b/ext/openssl/openssl.c @@ -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; @@ -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; } @@ -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; } @@ -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); - } } /* }}} */ |