commit 70ac5f8404f46cd2a9d3cb6c34cb89e61c76df1f from: Stefan Sperling date: Thu Mar 28 22:49:25 2019 UTC more init fixes for ref lists in tog commit - a55555f2c7fbcf2e430c5a8a866e53221dd8d279 commit + 70ac5f8404f46cd2a9d3cb6c34cb89e61c76df1f blob - 998a4efcd14a93700bb285366bfe36e9466f0265 blob + 6a5d7979534112e3d421c7b0de965e7f10ef4eb6 --- tog/tog.c +++ tog/tog.c @@ -2461,6 +2461,8 @@ cmd_diff(int argc, char *argv[]) char *id_str1 = NULL, *id_str2 = NULL; int ch; struct tog_view *view; + + SIMPLEQ_INIT(&refs); #ifndef PROFILE if (pledge("stdio rpath wpath cpath flock proc tty exec sendfd unveil", @@ -2515,7 +2517,6 @@ cmd_diff(int argc, char *argv[]) if (error) goto done; - SIMPLEQ_INIT(&refs); error = got_ref_list(&refs, repo); if (error) goto done; @@ -3181,6 +3182,8 @@ cmd_blame(int argc, char *argv[]) int ch; struct tog_view *view; + SIMPLEQ_INIT(&refs); + #ifndef PROFILE if (pledge("stdio rpath wpath cpath flock proc tty exec sendfd unveil", NULL) == -1) @@ -3281,7 +3284,6 @@ cmd_blame(int argc, char *argv[]) if (error != NULL) goto done; - SIMPLEQ_INIT(&refs); error = got_ref_list(&refs, repo); if (error) goto done; @@ -3857,6 +3859,8 @@ cmd_tree(int argc, char *argv[]) struct got_tree_object *tree = NULL; int ch; struct tog_view *view; + + SIMPLEQ_INIT(&refs); #ifndef PROFILE if (pledge("stdio rpath wpath cpath flock proc tty exec sendfd unveil", @@ -3931,7 +3935,6 @@ cmd_tree(int argc, char *argv[]) if (error != NULL) goto done; - SIMPLEQ_INIT(&refs); error = got_ref_list(&refs, repo); if (error) goto done;