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

login
register
mail settings
Submitter Yuya Nishihara
Date June 14, 2018, 11:38 a.m.
Message ID <478a74b8f243c79f40f1.1528976286@mimosa>
Download mbox | patch
Permalink /patch/32128/
State Accepted
Headers show

Comments

Yuya Nishihara - June 14, 2018, 11:38 a.m.
# HG changeset patch
# User Yuya Nishihara <yuya@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)
Augie Fackler - June 14, 2018, 3:07 p.m.
> On Jun 14, 2018, at 07:38, Yuya Nishihara <yuya@tcha.org> wrote:
> 
> # HG changeset patch
> # User Yuya Nishihara <yuya@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)

queued, thanks

Patch

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;
 }