Commit Diff


commit - e730157933b56de990631fcd0c36592713b32120
commit + 1b3893a25b982a0bd7329a9da23581024c6ac50d
blob - c32eb50c74c9d25165e37c1ab0064520c45ea011
blob + 631c01078b1852d23f17f9d132ab0af89fffd064
--- got/got.c
+++ got/got.c
@@ -780,6 +780,8 @@ cmd_log(int argc, char *argv[])
 	int show_patch = 0, limit = 0, first_parent_traversal = 0;
 	const char *errstr;
 	struct got_reflist_head refs;
+
+	SIMPLEQ_INIT(&refs);
 
 #ifndef PROFILE
 	if (pledge("stdio rpath wpath cpath flock proc exec sendfd unveil",
@@ -940,7 +942,6 @@ cmd_log(int argc, char *argv[])
 		path = in_repo_path;
 	}
 
-	SIMPLEQ_INIT(&refs);
 	error = got_ref_list(&refs, repo);
 	if (error)
 		goto done;