cvs: php-src(PHP_5_0) /ext/standard array.c
| From: | Stanislav Malyshev | Date: | Wed, 02 Feb 2005 10:24:50 +0000 |
| Subject: | cvs: php-src(PHP_5_0) /ext/standard array.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-30236@lists.php.net to get a copy of this message | ||
stas Wed Feb 2 05:24:50 2005 EDT
Modified files: (Branch: PHP_5_0)
/php-src/ext/standard array.c
Log:
fix leak if function call fails
http://cvs.php.net/diff.php/php-src/ext/standard/array.c?r1=1.266.2.11&r2=1.266.2.12&ty=u
Index: php-src/ext/standard/array.c
diff -u php-src/ext/standard/array.c:1.266.2.11 php-src/ext/standard/array.c:1.266.2.12
--- php-src/ext/standard/array.c:1.266.2.11 Thu Dec 23 11:38:13 2004
+++ php-src/ext/standard/array.c Wed Feb 2 05:24:50 2005
@@ -21,7 +21,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: array.c,v 1.266.2.11 2004/12/23 16:38:13 tony2001 Exp $ */
+/* $Id: array.c,v 1.266.2.12 2005/02/02 10:24:50 stas Exp $ */
#include "php.h"
#include "php_ini.h"
@@ -1062,6 +1062,10 @@
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;
}