Commit 61804a0ecefda4671f112b64880bd1730628a11f

Stefan Sperling 2018-09-02T14:27:24

fix double-free in tog's draw_file

1
2
3
4
5
6
7
8
9
10
11
12
diff --git a/tog/tog.c b/tog/tog.c
index 58d2f07..bc11e68 100644
--- a/tog/tog.c
+++ b/tog/tog.c
@@ -1506,7 +1506,6 @@ draw_file(struct tog_view *view, FILE *f, int *first_displayed_line,
 		err = format_line(&wline, &width, line, view->ncols);
 		if (err) {
 			free(line);
-			free(wline);
 			return err;
 		}
 		waddwstr(view->window, wline);