cvs: php-src /ext/standard array.c
| From: | Stanislav Malyshev | Date: | Wed, 02 Feb 2005 10:37:50 +0000 |
| Subject: | cvs: php-src /ext/standard array.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-30239@lists.php.net to get a copy of this message | ||
stas Wed Feb 2 05:37:50 2005 EDT
Modified files:
/php-src/ext/standard array.c
Log:
fix memory leak if function call fails
http://cvs.php.net/diff.php/php-src/ext/standard/array.c?r1=1.288&r2=1.289&ty=u
Index: php-src/ext/standard/array.c
diff -u php-src/ext/standard/array.c:1.288 php-src/ext/standard/array.c:1.289
--- php-src/ext/standard/array.c:1.288 Thu Dec 23 11:35:48 2004
+++ php-src/ext/standard/array.c Wed Feb 2 05:37:50 2005
@@ -21,7 +21,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: array.c,v 1.288 2004/12/23 16:35:48 tony2001 Exp $ */
+/* $Id: array.c,v 1.289 2005/02/02 10:37:50 stas Exp $ */
#include "php.h"
#include "php_ini.h"
@@ -1093,7 +1093,10 @@
} else {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to call %s() - function does not
exist", func_name);
}
-
+ if (key) {
+ zval_ptr_dtor(&key);
+ key = NULL;
+ }
efree(func_name);
break;
}