Mercurial > cpython-lru_cache-weakref
diff Python/compile.c @ 35939:79374eb6db51 legacy-trunk
Fix a few more ref leaks. Backport candidate
| author | Neal Norwitz <nnorwitz@gmail.com> |
|---|---|
| date | Thu, 24 Nov 2005 22:09:18 +0000 |
| parents | fe4c627b2096 |
| children | a29c89b4e8c6 |
line wrap: on
line diff
--- a/Python/compile.c Thu Nov 24 22:00:56 2005 +0000 +++ b/Python/compile.c Thu Nov 24 22:09:18 2005 +0000 @@ -1801,6 +1801,7 @@ 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 @@ } 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);
