summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStanislav Malyshev <stas@php.net>2001-03-12 10:14:00 +0000
committerStanislav Malyshev <stas@php.net>2001-03-12 10:14:00 +0000
commit0fa068e1fa629f4421a8f8f4306c2931df852a3f (patch)
treeff1f0b1fa0422f0a3be3a7298bde85814d339bc2
parent7a7590002c8eccadcab9075569535a9478ccfb65 (diff)
downloadphp-git-0fa068e1fa629f4421a8f8f4306c2931df852a3f.tar.gz
Prevent memory leak
-rw-r--r--ext/standard/array.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/standard/array.c b/ext/standard/array.c
index 3a455def58..dee9a57c99 100644
--- a/ext/standard/array.c
+++ b/ext/standard/array.c
@@ -2209,7 +2209,7 @@ PHP_FUNCTION(array_flip)
} else if (Z_TYPE_PP(entry) == IS_STRING) {
zend_hash_update(Z_ARRVAL_P(return_value),Z_STRVAL_PP(entry),Z_STRLEN_PP(entry) + 1, &data, sizeof(data), NULL);
} else {
- zval_dtor(data);
+ zval_ptr_dtor(&data); /* will free also zval structure */
php_error(E_WARNING, "Can only flip STRING and INTEGER values!");
}