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;
}
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]