dirs: fix leak of iterator in dirs_fromiter stable
authorAugie Fackler <augie@google.com>
Tue, 27 Jan 2015 10:10:04 -0500
branchstable
changeset 23960 bca4b6f126f2
parent 23959 c8e7fa41bfc5
child 23961 bc851e2851b1
dirs: fix leak of iterator in dirs_fromiter Spotted with cpychecker.
mercurial/dirs.c
--- a/mercurial/dirs.c	Tue Jan 27 10:07:04 2015 -0500
+++ b/mercurial/dirs.c	Tue Jan 27 10:10:04 2015 -0500
@@ -175,6 +175,7 @@
 	}
 
 	ret = PyErr_Occurred() ? -1 : 0;
+	Py_DECREF(iter);
 	Py_XDECREF(item);
 	return ret;
 }