From: Wez Furlong Date: Wed, 27 Oct 2004 11:07:53 +0000 (+0000) Subject: Fix possible crash; patch by Kamesh Jayachandran X-Git-Tag: php-5.0.3RC1~121 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0faac783e9dd7e00b542f78f20462ade35d87c7b;p=php Fix possible crash; patch by Kamesh Jayachandran --- diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c index 091b14ff77..bb540d96b9 100644 --- a/ext/openssl/openssl.c +++ b/ext/openssl/openssl.c @@ -1670,6 +1670,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! */ }