[PATCH 2 of 2] bdiff: one more safe call of bdiff_freehunks(NULL)

Yuya Nishihara yuya at tcha.org
Thu Jun 14 07:38:06 EDT 2018


# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1528975551 -32400
#      Thu Jun 14 20:25:51 2018 +0900
# Node ID 478a74b8f243c79f40f1f0409df40afc0b4ffb9c
# Parent  d248414ffa9b640306c714eec13d3ed8cb8a671b
bdiff: one more safe call of bdiff_freehunks(NULL)

diff --git a/mercurial/cext/bdiff.c b/mercurial/cext/bdiff.c
--- a/mercurial/cext/bdiff.c
+++ b/mercurial/cext/bdiff.c
@@ -157,9 +157,7 @@ cleanup:
 	PyBuffer_Release(&bb);
 	free(al);
 	free(bl);
-	if (l.next) {
-		bdiff_freehunks(l.next);
-	}
+	bdiff_freehunks(l.next);
 	return result;
 }
 


More information about the Mercurial-devel mailing list