cvs: php4 /ext/standard array.c

From: Date: Wed, 21 Feb 2001 17:22:27 +0000
Subject: cvs: php4 /ext/standard array.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-4185@lists.php.net to get a copy of this message
andrei Wed Feb 21 09:22:27 2001 EDT Modified files: /php4/ext/standard array.c Log: Fix memory leak. Index: php4/ext/standard/array.c diff -u php4/ext/standard/array.c:1.94 php4/ext/standard/array.c:1.95 --- php4/ext/standard/array.c:1.94 Tue Feb 20 08:44:57 2001 +++ php4/ext/standard/array.c Wed Feb 21 09:22:26 2001 @@ -21,7 +21,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: array.c,v 1.94 2001/02/20 16:44:57 jason Exp $ */ +/* $Id: array.c,v 1.95 2001/02/21 17:22:26 andrei Exp $ */ #include "php.h" #include "php_ini.h" @@ -1517,6 +1517,7 @@ stack = *args[0]; if (Z_TYPE_P(stack) != IS_ARRAY) { php_error(E_WARNING, "First argument to array_push() needs to be an array"); + efree(args); RETURN_FALSE; } @@ -1621,6 +1622,7 @@ stack = *args[0]; if (Z_TYPE_P(stack) != IS_ARRAY) { php_error(E_WARNING, "First argument to array_unshift() needs to be an array"); + efree(args); RETURN_FALSE; }

« previous php.cvs (#4185) next »