From 02b50acd93b6b464e309712c1f76269d6b6e8272 Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Wed, 27 Oct 2004 11:11:28 +0000 Subject: [PATCH] Fix possible crash; patch by Kamesh Jayachandran --- ext/openssl/openssl.c | 1 + 1 file changed, 1 insertion(+) 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! */ -- 2.50.1