]> granicus.if.org Git - php/commitdiff
Fix possible crash; patch by Kamesh Jayachandran
authorWez Furlong <wez@php.net>
Wed, 27 Oct 2004 11:07:53 +0000 (11:07 +0000)
committerWez Furlong <wez@php.net>
Wed, 27 Oct 2004 11:07:53 +0000 (11:07 +0000)
ext/openssl/openssl.c

index 091b14ff772a51e226601317f3323bae51998f7a..bb540d96b92de737b7b00fbdf4d259679449d6e6 100644 (file)
@@ -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! */
                                                }