Mercurial > hg
changeset 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 | f819aa9dbbf9 |
children | b6ab0adf379d |
files | mercurial/parsers.c |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
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);