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,8 +37,10 @@ void free_zend_constant(zend_constant *c)
void copy_zend_constant(zend_constant *c)
{
c->name = zend_strndup(c->name, c->name_len);
if (!(c->flags & CONST_PERSISTENT)) {
zval_copy_ctor(&c->value);
}
}
void zend_copy_constants(HashTable *target, HashTable *source)