diff options
Diffstat (limited to 'Objects/frameobject.c')
-rw-r--r-- | Objects/frameobject.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Objects/frameobject.c b/Objects/frameobject.c index 5d85445..64fc52f 100644 --- a/Objects/frameobject.c +++ b/Objects/frameobject.c @@ -204,11 +204,11 @@ PyFrame_New(tstate, code, globals, locals) if (builtins == NULL) { /* No builtins! Make up a minimal one. */ builtins = PyDict_New(); - if (builtins == NULL) - return NULL; - /* Give them 'None', at least. */ - if (PyDict_SetItemString(builtins, "None", Py_None) < 0) + if (builtins == NULL || /* Give them 'None', at least. */ + PyDict_SetItemString(builtins, "None", Py_None) < 0) { + Py_DECREF(f); return NULL; + } } else Py_XINCREF(builtins); |