changeset 23946:f3e94aa6e182 stable

parsers: don't leak a tuple in pack_dirstate Spotted with cpychecker.
author Augie Fackler <augie@google.com>
date Fri, 23 Jan 2015 15:48:18 -0500
parents 33d6aaf84c9e
children 2cb49fba9736
files mercurial/parsers.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/parsers.c	Fri Jan 23 15:41:46 2015 -0500
+++ b/mercurial/parsers.c	Fri Jan 23 15:48:18 2015 -0500
@@ -410,7 +410,7 @@
 	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 @@
 bail:
 	Py_XDECREF(mtime_unset);
 	Py_XDECREF(packobj);
+	Py_XDECREF(v);
 	return NULL;
 }