mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Fix a few more ref leaks. Backport candidate
This commit is contained in:
parent
430f68b447
commit
3715c3e576
3 changed files with 8 additions and 4 deletions
|
@ -1801,6 +1801,7 @@ compiler_lookup_arg(PyObject *dict, PyObject *name)
|
|||
if (k == NULL)
|
||||
return -1;
|
||||
v = PyDict_GetItem(dict, k);
|
||||
Py_DECREF(k);
|
||||
if (v == NULL)
|
||||
return -1;
|
||||
return PyInt_AS_LONG(v);
|
||||
|
@ -2464,6 +2465,7 @@ compiler_from_import(struct compiler *c, stmt_ty s)
|
|||
}
|
||||
|
||||
ADDOP_O(c, LOAD_CONST, names, consts);
|
||||
Py_DECREF(names);
|
||||
ADDOP_NAME(c, IMPORT_NAME, s->v.ImportFrom.module, names);
|
||||
for (i = 0; i < n; i++) {
|
||||
alias_ty alias = asdl_seq_GET(s->v.ImportFrom.names, i);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue