mirror of
https://github.com/pocketpy/pocketpy
synced 2026-05-06 10:13:37 +00:00
Merge pull request #500 from ngoyal88/main
fix(core): prevent memory leak in py_execo error path
This commit is contained in:
commit
8424d29fb2
@ -159,7 +159,9 @@ bool py_execo(const void* data, int size, const char* filename, py_Ref module) {
|
|||||||
CodeObject__dtor(&co);
|
CodeObject__dtor(&co);
|
||||||
return ok;
|
return ok;
|
||||||
} else {
|
} else {
|
||||||
return RuntimeError("bad code object %s: %s", filename, err);
|
bool ok = RuntimeError("bad code object %s: %s", filename, err);
|
||||||
|
PK_FREE(err);
|
||||||
|
return ok;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user