1
0
mirror of https://github.com/php/php-src.git synced 2026-04-09 09:03:04 +02:00

Fix a memory leak

This commit is contained in:
Zeev Suraski
2000-02-13 22:15:06 +00:00
parent 7fa7c8a8e3
commit 603aca0bb3

View File

@@ -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);
}
}