diff options
author | Zeev Suraski <zeev@php.net> | 2000-02-13 22:15:06 +0000 |
---|---|---|
committer | Zeev Suraski <zeev@php.net> | 2000-02-13 22:15:06 +0000 |
commit | 603aca0bb3044b87e3fca392ca6bbbe7f31cb64f (patch) | |
tree | 62532026e6c480067690e43394fcf7223fec6148 | |
parent | 7fa7c8a8e3f93ffef4be19047c7461eccafd2431 (diff) | |
download | php-git-603aca0bb3044b87e3fca392ca6bbbe7f31cb64f.tar.gz |
Fix a memory leak
-rw-r--r-- | Zend/zend_constants.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Zend/zend_constants.c b/Zend/zend_constants.c index 5e6b1a3075..54ba984d47 100644 --- a/Zend/zend_constants.c +++ b/Zend/zend_constants.c @@ -37,7 +37,9 @@ void free_zend_constant(zend_constant *c) void copy_zend_constant(zend_constant *c) { c->name = zend_strndup(c->name, c->name_len); - zval_copy_ctor(&c->value); + if (!(c->flags & CONST_PERSISTENT)) { + zval_copy_ctor(&c->value); + } } |