Commit 573463cc61f9bda627a7e2ea5fee789cff67b01d

Stefan Sperling 2019-04-06T05:31:33

init output parameter in walk_dir()

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/lib/fileindex.c b/lib/fileindex.c
index b24976a..155c46e 100644
--- a/lib/fileindex.c
+++ b/lib/fileindex.c
@@ -767,6 +767,8 @@ walk_dir(struct got_pathlist_entry **next, struct got_fileindex *fileindex,
 	const struct got_error *err = NULL;
 	struct dirent *de = dle->data;
 
+	*next = NULL;
+
 	if (de->d_type == DT_DIR) {
 		char *subpath;
 		char *subdirpath;