Merge pull request #320 from Azaezel/alpha40_Execute_internalExecute_Bug

memleak fix
This commit is contained in:
Brian Roberts 2020-09-25 12:28:55 -05:00 committed by GitHub
commit 7097edc2fe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1496,6 +1496,7 @@ ConsoleValueRef _internalExecute(S32 argc, ConsoleValueRef argv[])
}
bool result;
const char* methodRes = CInterface::CallFunction(NULL, argv[0], argv_str, argc - 1, &result);
free(argv_str);
if (result)
{
return ConsoleValueRef::fromValue(CSTK.pushString(methodRes));