Skip to content

Commit afedfff

Browse files
fix memory leak
1 parent 72e5477 commit afedfff

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/pyTypeFactory.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,7 @@ PyObject *callJSFunc(PyObject *jsCxThisFuncTuple, PyObject *args) {
213213
JS::HandleValueArray jsArgs(jsArgsVector);
214214
JS::Rooted<JS::Value> *jsReturnVal = new JS::Rooted<JS::Value>(cx);
215215
if (!JS_CallFunctionValue(cx, *thisObj, *jsFunc, jsArgs, jsReturnVal)) {
216+
delete thisObj;
216217
setSpiderMonkeyException(cx);
217218
return NULL;
218219
}

0 commit comments

Comments
 (0)