0
0
mirror of https://github.com/phpv8/v8js.git synced 2024-12-22 08:11:52 +00:00

don't free interned strings, only persistent ones

This commit is contained in:
Stefan Siegl 2018-07-18 23:36:13 +02:00
parent d4cb8f5783
commit 18b79d9004
No known key found for this signature in database
GPG Key ID: 73942AF5642F3DDA

View File

@ -991,7 +991,10 @@ static void v8js_persistent_zval_ctor(zval *p) /* {{{ */
static void v8js_persistent_zval_dtor(zval *p) /* {{{ */
{
assert(Z_TYPE_P(p) == IS_STRING);
free(Z_STR_P(p));
if (!ZSTR_IS_INTERNED(Z_STR_P(p))) {
free(Z_STR_P(p));
}
}
/* }}} */