commit e54cc94af2217992a549a0ae0cf2d38314120297 from: Stefan Sperling date: Wed Nov 11 00:34:59 2020 UTC plug two memory leaks in tog's draw_file() commit - fe621944e83fe6367f7bff97128b4240a9cdc7c5 commit + e54cc94af2217992a549a0ae0cf2d38314120297 blob - 5c342d04532bc0afd259f34ddbde2e17205b733a blob + 07b0a442edfa8fd3776c4eb050a1d641afb97232 --- tog/tog.c +++ tog/tog.c @@ -2823,6 +2823,8 @@ draw_file(struct tog_view *view, FILE *f, int first_di if (view_needs_focus_indication(view)) wstandout(view->window); waddwstr(view->window, wline); + free(wline); + wline = NULL; if (view_needs_focus_indication(view)) wstandend(view->window); if (width <= view->ncols - 1) @@ -2881,6 +2883,8 @@ draw_file(struct tog_view *view, FILE *f, int first_di wstandout(view->window); waddwstr(view->window, wline); + free(wline); + wline = NULL; wstandend(view->window); }