changeset 23960:bca4b6f126f2 stable

dirs: fix leak of iterator in dirs_fromiter Spotted with cpychecker.
author Augie Fackler <augie@google.com>
date Tue, 27 Jan 2015 10:10:04 -0500
parents c8e7fa41bfc5
children bc851e2851b1
files mercurial/dirs.c
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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;
 }