]> granicus.if.org Git - php/commitdiff
Fixed bug #36205 (Memory leaks on duplicate cookies)
authorDmitry Stogov <dmitry@php.net>
Mon, 13 Feb 2006 12:19:10 +0000 (12:19 +0000)
committerDmitry Stogov <dmitry@php.net>
Mon, 13 Feb 2006 12:19:10 +0000 (12:19 +0000)
NEWS
main/php_variables.c

diff --git a/NEWS b/NEWS
index 5eadb57d101c7b171324452af827bc4de0fc064e..fd1a508f5e4489eccb62d1b3d657f9430aa82c3a 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,7 @@ PHP 4                                                                      NEWS
 - Added a check for special characters in the session name. (Ilia)
 - Fixed bug #36242 (Possible memory corruption in stream_select()). (Tony)
 - Fixed bug #36223 (curl bypasses open_basedir restrictions). (Tony)
+- Fixed bug #36205 (Memory leaks on duplicate cookies). (Dmitry)
 - Fixed bug #36148 (unpack("H*hex", $data) is adding an extra character to the 
   end of the string). (Ilia)
 - Fixed bug #36017 (fopen() crashes PHP when opening a URL). (Tony)
index 6cd5402253a89160bfa85dd913a0839961275df4..eacb0a4425f26505a715837f83c7f1ca90bfe24c 100644 (file)
@@ -201,6 +201,7 @@ plain_var:
                                        if (PG(http_globals)[TRACK_VARS_COOKIE] && symtable1 == Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_COOKIE]) && 
                                                        zend_hash_find(symtable1, escaped_index, index_len+1, (void **) &tmp) != FAILURE) {
                                                efree(escaped_index);
+                                               zval_ptr_dtor(&gpc_element);
                                                break;
                                        }
                                        
@@ -209,6 +210,7 @@ plain_var:
                                } else {
                                        if (PG(http_globals)[TRACK_VARS_COOKIE] && symtable1 == Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_COOKIE]) && 
                                                        zend_hash_find(symtable1, index, index_len+1, (void **) &tmp) != FAILURE) {
+                                               zval_ptr_dtor(&gpc_element);
                                                break;
                                        }