# HG changeset patch # User Augie Fackler # Date 1422046240 18000 # Node ID 2cb49fba97364cc6f3df7ba2fce08d82a19419e4 # Parent f3e94aa6e1823f83fd6a099cf3a2f2b77a4e26b2 parsers: don't leak a reference to raise_revlog_error on success Found with cpychecker. diff -r f3e94aa6e182 -r 2cb49fba9736 mercurial/parsers.c --- a/mercurial/parsers.c Fri Jan 23 15:48:18 2015 -0500 +++ b/mercurial/parsers.c Fri Jan 23 15:50:40 2015 -0500 @@ -1262,6 +1262,7 @@ goto classfail; } Py_INCREF(errclass); + Py_DECREF(mod); } errobj = PyObject_CallFunction(errclass, NULL);