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

index b1a7c856a8d52f656259f4803cbecda33093e65f..6c78ad937a5ef8761efe27043f40b1b48a288f2b 100644 (file)
@@ -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! */