Commit 5d731149d3ea6345b1d5f305211e91eee9f038cd

Stefan Sperling 2019-02-08T13:22:01

initialize temp_files in got_merge_diff3()

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/lib/diff3.c b/lib/diff3.c
index bd1d37e..651456a 100644
--- a/lib/diff3.c
+++ b/lib/diff3.c
@@ -268,6 +268,8 @@ got_merge_diff3(int outfd, const char *p1, const char *p2, const char *p3)
 	struct diff3_state *d3s;
 	int i;
 
+	SLIST_INIT(&temp_files);
+
 	d3s = calloc(1, sizeof(*d3s));
 	if (d3s == NULL)
 		return got_error_from_errno();