From: Wez Furlong Date: Wed, 27 Oct 2004 11:07:26 +0000 (+0000) Subject: Fix possible crash; patch by Kamesh Jayachandran X-Git-Tag: RELEASE_0_2~824 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c8cc96e6fe156fe1a996cf6df30a37907a6dc8e0;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! */ }