Skip to content

Commit b087346

Browse files
committed
Release SquirrelVM::lastError_ after pushing it to the VM stack
This fixes a memory leak.
1 parent 778761f commit b087346

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

sp/src/vscript/vscript_squirrel.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1469,6 +1469,7 @@ SQInteger function_stub(HSQUIRRELVM vm)
14691469
if (!sq_isnull(pSquirrelVM->lastError_))
14701470
{
14711471
sq_pushobject(vm, pSquirrelVM->lastError_);
1472+
sq_release(vm, &pSquirrelVM->lastError_);
14721473
sq_retval = sq_throwobject(vm);
14731474
}
14741475
else

0 commit comments

Comments
 (0)