commit 4f1a8200c610fa751d18ba5026ad429a0ca35a06 from: Stefan Sperling date: Tue May 08 07:07:46 2018 UTC fix potential crash in tog(1) commit - c4972b91909a980b5aca013dd63d027d832f22bc commit + 4f1a8200c610fa751d18ba5026ad429a0ca35a06 blob - 15126bb28d6e3c245e929c10fb3104a3949fba9f blob + a7e30241ef99eaa816bb8180b62d9490702689dd --- tog/tog.c +++ tog/tog.c @@ -422,7 +422,6 @@ show_log_view(struct got_object_id *start_id, struct g entry = TAILQ_LAST(&commits, commit_queue); if (entry->commit->nparents == 0) break; - got_object_close(obj); pop_commit(&commits); if (TAILQ_EMPTY(&commits)) { refetch_commits = 1; @@ -434,6 +433,7 @@ show_log_view(struct got_object_id *start_id, struct g err = got_error_from_errno(); goto done; } + got_object_close(obj); err = got_object_open(&obj, repo, id); if (err) return err;