commit 6efe6ea96a3b926e024566b15a6c0bb9f5ce0c79 from: Josiah Frentsos via: Mark Jamsek date: Sat Jul 15 02:56:11 2023 UTC tog: fix double-free in blame view error path open_diff_view() has already called view_close() on error. Patch by Josiah Frentsos. commit - 1494a06e4ce25cf1beafa90b6b1f98bdebf9e7e2 commit + 6efe6ea96a3b926e024566b15a6c0bb9f5ce0c79 blob - f94aa18a4e4ab0a9b2df4a58ff12917a90b189c3 blob + 7bb059ecfaa26dc3c7b8d9f630f63c581d525b9b --- tog/tog.c +++ tog/tog.c @@ -6956,10 +6956,8 @@ input_blame_view(struct tog_view **new_view, struct to err = open_diff_view(diff_view, pid ? &pid->id : NULL, id, NULL, NULL, 3, 0, 0, view, s->repo); got_object_commit_close(commit); - if (err) { - view_close(diff_view); + if (err) break; - } s->last_diffed_line = s->first_displayed_line - 1 + s->selected_line; if (*new_view)