# HG changeset patch # User Augie Fackler # Date 2015-01-23 20:48:18 # Node ID f3e94aa6e1823f83fd6a099cf3a2f2b77a4e26b2 # Parent 33d6aaf84c9e9820c6c974ac498acbc12187466b parsers: don't leak a tuple in pack_dirstate Spotted with cpychecker. diff --git a/mercurial/parsers.c b/mercurial/parsers.c --- a/mercurial/parsers.c +++ b/mercurial/parsers.c @@ -410,7 +410,7 @@ static PyObject *pack_dirstate(PyObject PyObject *packobj = NULL; PyObject *map, *copymap, *pl, *mtime_unset = NULL; Py_ssize_t nbytes, pos, l; - PyObject *k, *v, *pn; + PyObject *k, *v = NULL, *pn; char *p, *s; double now; @@ -527,6 +527,7 @@ static PyObject *pack_dirstate(PyObject bail: Py_XDECREF(mtime_unset); Py_XDECREF(packobj); + Py_XDECREF(v); return NULL; }