mirror of
https://github.com/php/php-src.git
synced 2024-09-22 02:17:32 +00:00
Fix a memory leak
This commit is contained in:
parent
7fa7c8a8e3
commit
603aca0bb3
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user