Commit 83969eee authored by Martin v. Löwis's avatar Martin v. Löwis

Decref all if ensure_fromlist fails. Fixes #876533.

Backported to 2.3.
parent 05f842ba
......@@ -2104,9 +2104,10 @@ ensure_fromlist(PyObject *mod, PyObject *fromlist, char *buf, int buflen,
if (all == NULL)
PyErr_Clear();
else {
if (!ensure_fromlist(mod, all, buf, buflen, 1))
return 0;
int ret = ensure_fromlist(mod, all, buf, buflen, 1);
Py_DECREF(all);
if (!ret)
return 0;
}
continue;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment