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

fix null-ptr deref

This commit is contained in:
Stefan Siegl 2018-07-13 14:21:45 +02:00
parent aa041b4597
commit 4762dd1f0a
No known key found for this signature in database
GPG Key ID: 73942AF5642F3DDA

View File

@ -273,9 +273,14 @@ static void v8js_jsext_free_storage(v8js_jsext *jsext) /* {{{ */
v8js_free_ext_strarr(jsext->deps, jsext->deps_count);
}
delete jsext->extension;
// Free the persisted non-interned strings we allocated.
zend_string_release(jsext->name);
zend_string_release(jsext->source);
if (jsext->name) {
zend_string_release(jsext->name);
}
if (jsext->source) {
zend_string_release(jsext->source);
}
free(jsext);
}