commit a55555f2c7fbcf2e430c5a8a866e53221dd8d279 from: Stefan Sperling date: Thu Mar 28 22:44:52 2019 UTC ensure that ref list is always initialized in tog's cmd_log() commit - a129376b6f8adc074c4b53a4f78195ca32b78b1a commit + a55555f2c7fbcf2e430c5a8a866e53221dd8d279 blob - 1a7431f898376074dd8afb26bfad4c19dc2abbe8 blob + 998a4efcd14a93700bb285366bfe36e9466f0265 --- tog/tog.c +++ tog/tog.c @@ -1828,6 +1828,8 @@ cmd_log(int argc, char *argv[]) char *start_commit = NULL; int ch; struct tog_view *view; + + SIMPLEQ_INIT(&refs); #ifndef PROFILE if (pledge("stdio rpath wpath cpath flock proc tty exec sendfd unveil", @@ -1912,7 +1914,6 @@ cmd_log(int argc, char *argv[]) if (error != NULL) goto done; - SIMPLEQ_INIT(&refs); error = got_ref_list(&refs, repo); if (error) goto done;