0
0
mirror of https://github.com/phpv8/v8js.git synced 2025-03-11 22:18:44 +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,8 +991,11 @@ static void v8js_persistent_zval_ctor(zval *p) /* {{{ */
static void v8js_persistent_zval_dtor(zval *p) /* {{{ */ static void v8js_persistent_zval_dtor(zval *p) /* {{{ */
{ {
assert(Z_TYPE_P(p) == IS_STRING); assert(Z_TYPE_P(p) == IS_STRING);
if (!ZSTR_IS_INTERNED(Z_STR_P(p))) {
free(Z_STR_P(p)); free(Z_STR_P(p));
} }
}
/* }}} */ /* }}} */
static void v8js_script_free(v8js_script *res) static void v8js_script_free(v8js_script *res)