dirstate: fix leak of entry object in dirstate_item_from_v1_data()
authorYuya Nishihara <yuya@tcha.org>
Thu, 23 Sep 2021 16:52:35 +0900
changeset 48028 448aff4e8dd4
parent 48027 13efd8fdc55f
child 48029 f82c4e8afe5c
dirstate: fix leak of entry object in dirstate_item_from_v1_data()
mercurial/cext/parsers.c
--- a/mercurial/cext/parsers.c	Thu Sep 23 16:44:17 2021 +0900
+++ b/mercurial/cext/parsers.c	Thu Sep 23 16:52:35 2021 +0900
@@ -352,6 +352,7 @@
 		PyErr_Format(PyExc_RuntimeError,
 		             "unknown state: `%c` (%d, %d, %d)", state, mode,
 		             size, mtime, NULL);
+		Py_DECREF(t);
 		return NULL;
 	}