Mercurial > public > mercurial-scm > hg
diff mercurial/parsers.c @ 31291:fffd1abb1337
parsers: avoid leak of nonnset and otherpset
Py_BuildValue increments the refcount, rather than stealing the
reference, which I missed in code review.
author | Augie Fackler <augie@google.com> |
---|---|
date | Fri, 10 Mar 2017 16:53:00 -0500 |
parents | 1c97a91a18dc |
children | b6ab0adf379d |
line wrap: on
line diff
--- a/mercurial/parsers.c Thu Mar 09 20:33:29 2017 -0800 +++ b/mercurial/parsers.c Fri Mar 10 16:53:00 2017 -0500 @@ -604,6 +604,8 @@ result = Py_BuildValue("(OO)", nonnset, otherpset); if (result == NULL) goto bail; + Py_DECREF(nonnset); + Py_DECREF(otherpset); return result; bail: Py_XDECREF(nonnset);