Mercurial > cpython-lru_cache-weakref
diff Python/import.c @ 31778:c4bae089bfc8 legacy-trunk
Decref all if ensure_fromlist fails. Fixes #876533.
Backported to 2.3.
| author | Martin v. Löwis <martin@v.loewis.de> |
|---|---|
| date | Tue, 23 Mar 2004 16:28:13 +0000 |
| parents | ca4374662632 |
| children | 846b3ee7e106 |
line wrap: on
line diff
--- a/Python/import.c Mon Mar 22 22:22:05 2004 +0000 +++ b/Python/import.c Tue Mar 23 16:28:13 2004 +0000 @@ -2104,9 +2104,10 @@ if (all == NULL) PyErr_Clear(); else { - if (!ensure_fromlist(mod, all, buf, buflen, 1)) + int ret = ensure_fromlist(mod, all, buf, buflen, 1); + Py_DECREF(all); + if (!ret) return 0; - Py_DECREF(all); } continue; }
