Commit a8857af3 authored by Stefan Krah's avatar Stefan Krah

Issue #15741: Fix potential NULL dereference. Found by Coverity.

parent d928b6a9
...@@ -523,6 +523,8 @@ builtin_compile(PyObject *self, PyObject *args, PyObject *kwds) ...@@ -523,6 +523,8 @@ builtin_compile(PyObject *self, PyObject *args, PyObject *kwds)
mod_ty mod; mod_ty mod;
arena = PyArena_New(); arena = PyArena_New();
if (arena == NULL)
return NULL;
mod = PyAST_obj2mod(cmd, arena, mode); mod = PyAST_obj2mod(cmd, arena, mode);
if (mod == NULL) { if (mod == NULL) {
PyArena_Free(arena); PyArena_Free(arena);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment