-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
Closed
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Here's the problematic code:
Lines 2497 to 2504 in d8d9491
if (PyFrameLocalsProxy_Check(locals)) { | |
PyObject* ret = PyDict_New(); | |
if (PyDict_Update(ret, locals)) { | |
Py_DECREF(ret); | |
return NULL; | |
} | |
Py_DECREF(locals); | |
return ret; |
What's wrong?
PyDict_New()
can returnNULL
, it is not checkedPy_DECREF(locals);
is only called on success, but not on error
Refs b034f14
I have a PR ready.
Linked PRs
Eclips4
Metadata
Metadata
Assignees
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error