changeset 48028:448aff4e8dd4

dirstate: fix leak of entry object in dirstate_item_from_v1_data()
author Yuya Nishihara <yuya@tcha.org>
date Thu, 23 Sep 2021 16:52:35 +0900
parents 13efd8fdc55f
children f82c4e8afe5c
files mercurial/cext/parsers.c
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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;
 	}