parsers: don't leak a reference to raise_revlog_error on success stable
authorAugie Fackler <augie@google.com>
Fri, 23 Jan 2015 15:50:40 -0500
branchstable
changeset 23947 2cb49fba9736
parent 23946 f3e94aa6e182
child 23948 bd307b462ce2
parsers: don't leak a reference to raise_revlog_error on success Found with cpychecker.
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);