diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2005-11-24 22:09:18 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2005-11-24 22:09:18 (GMT) |
commit | 3715c3e576a182692cf2ad2d390732126f11780d (patch) | |
tree | 3697c936d8d681dc025408bcc9db20824a3f2db6 /Python/compile.c | |
parent | 430f68b447f61aab20b7db58705f6b16b10d5149 (diff) | |
download | cpython-3715c3e576a182692cf2ad2d390732126f11780d.zip cpython-3715c3e576a182692cf2ad2d390732126f11780d.tar.gz cpython-3715c3e576a182692cf2ad2d390732126f11780d.tar.bz2 |
Fix a few more ref leaks. Backport candidate
Diffstat (limited to 'Python/compile.c')
-rw-r--r-- | Python/compile.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Python/compile.c b/Python/compile.c index 5905c45..418194e 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -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); |