# HG changeset patch # User Augie Fackler # Date 1489182780 18000 # Node ID fffd1abb13377cebb1de20661c5995e029724942 # Parent f819aa9dbbf947d32905076f9e461ef695906cad parsers: avoid leak of nonnset and otherpset Py_BuildValue increments the refcount, rather than stealing the reference, which I missed in code review. diff -r f819aa9dbbf9 -r fffd1abb1337 mercurial/parsers.c --- 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);