Merge pull request #500 from ngoyal88/main

fix(core): prevent memory leak in py_execo error path
This commit is contained in:
BLUELOVETH 2026-04-19 12:45:13 +08:00 committed by GitHub
commit 8424d29fb2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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;
} }
} }