File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -4370,7 +4370,7 @@ PHP_FUNCTION(openssl_pkey_new)
4370
4370
EC_KEY * eckey = NULL ;
4371
4371
EC_GROUP * group = NULL ;
4372
4372
EC_POINT * pnt = NULL ;
4373
- const BIGNUM * d ;
4373
+ BIGNUM * d = NULL ;
4374
4374
pkey = EVP_PKEY_new ();
4375
4375
if (pkey ) {
4376
4376
eckey = EC_KEY_new ();
@@ -4418,6 +4418,8 @@ PHP_FUNCTION(openssl_pkey_new)
4418
4418
php_openssl_store_errors ();
4419
4419
goto clean_exit ;
4420
4420
}
4421
+
4422
+ BN_free (d );
4421
4423
} else if ((x = zend_hash_str_find (Z_ARRVAL_P (data ), "x" , sizeof ("x" ) - 1 )) != NULL &&
4422
4424
Z_TYPE_P (x ) == IS_STRING &&
4423
4425
(y = zend_hash_str_find (Z_ARRVAL_P (data ), "y" , sizeof ("y" ) - 1 )) != NULL &&
@@ -4462,6 +4464,9 @@ PHP_FUNCTION(openssl_pkey_new)
4462
4464
php_openssl_store_errors ();
4463
4465
}
4464
4466
clean_exit :
4467
+ if (d != NULL ) {
4468
+ BN_free (d );
4469
+ }
4465
4470
if (pnt != NULL ) {
4466
4471
EC_POINT_free (pnt );
4467
4472
}
You can’t perform that action at this time.
0 commit comments