]> granicus.if.org Git - php/commitdiff
fix a memory leak in implode()
authorSterling Hughes <sterling@php.net>
Fri, 4 Oct 2002 16:54:56 +0000 (16:54 +0000)
committerSterling Hughes <sterling@php.net>
Fri, 4 Oct 2002 16:54:56 +0000 (16:54 +0000)
# kept seperate from last commit on purpose.. ;)

ext/standard/string.c

index d462b7da271b959c19b5de3256406e56aeed53ea..2d26475ab57fc8985cec9ff8cb83e6245079de4a 100644 (file)
@@ -899,6 +899,10 @@ PHP_FUNCTION(implode)
        }
 
        php_implode(delim, arr, return_value);
+       zval_ptr_dtor(arg1);
+       if (arg2) {
+               zval_ptr_dtor(arg2);
+       }
 }
 /* }}} */