From: Wez Furlong Date: Wed, 27 Oct 2004 11:11:28 +0000 (+0000) Subject: Fix possible crash; patch by Kamesh Jayachandran X-Git-Tag: php-4.3.10RC1~39 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=02b50acd93b6b464e309712c1f76269d6b6e8272;p=php Fix possible crash; patch by Kamesh Jayachandran --- diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c index b1a7c856a8..6c78ad937a 100644 --- a/ext/openssl/openssl.c +++ b/ext/openssl/openssl.c @@ -1611,6 +1611,7 @@ PHP_FUNCTION(openssl_csr_new) if (we_made_the_key) { /* and a resource for the private key */ ZVAL_RESOURCE(out_pkey, zend_list_insert(req.priv_key, le_key)); + req.priv_key = NULL; /* make sure the cleanup code doesn't zap it! */ } else if (key_resource != -1) req.priv_key = NULL; /* make sure the cleanup code doesn't zap it! */