summaryrefslogtreecommitdiff
path: root/main/php_variables.c
diff options
context:
space:
mode:
authorStanislav Malyshev <stas@php.net>2012-02-01 19:52:05 +0000
committerStanislav Malyshev <stas@php.net>2012-02-01 19:52:05 +0000
commit40d8cd1f122873af7e21dfe4cad24702c4be48f9 (patch)
tree93bdfb4e50c374d46d112a4af59910bed2dfa483 /main/php_variables.c
parent78c8b4c8ffd7a010f976ab0508f3d3c2205bd40b (diff)
downloadphp-git-40d8cd1f122873af7e21dfe4cad24702c4be48f9.tar.gz
fix UMR in php_register_variable_ex, reported by Stefan Esser
Diffstat (limited to 'main/php_variables.c')
-rw-r--r--main/php_variables.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/main/php_variables.c b/main/php_variables.c
index 42c8f79c13..8dd5c140c0 100644
--- a/main/php_variables.c
+++ b/main/php_variables.c
@@ -198,6 +198,9 @@ PHPAPI void php_register_variable_ex(char *var_name, zval *val, zval *track_vars
MAKE_STD_ZVAL(gpc_element);
array_init(gpc_element);
zend_symtable_update(symtable1, escaped_index, index_len + 1, &gpc_element, sizeof(zval *), (void **) &gpc_element_p);
+ } else {
+ efree(var_orig);
+ return;
}
}
if (index != escaped_index) {