Skip to content

Commit 83395bc

Browse files
committed
Issue #15741: Fix potential NULL dereference. Found by Coverity.
1 parent 6c1a3d7 commit 83395bc

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

Python/bltinmodule.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -523,6 +523,8 @@ builtin_compile(PyObject *self, PyObject *args, PyObject *kwds)
523523
mod_ty mod;
524524

525525
arena = PyArena_New();
526+
if (arena == NULL)
527+
return NULL;
526528
mod = PyAST_obj2mod(cmd, arena, mode);
527529
if (mod == NULL) {
528530
PyArena_Free(arena);

0 commit comments

Comments
 (0)