diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2014-09-09 09:53:46 +0200 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2014-09-09 10:10:37 +0200 |
| commit | fac398accd9ef50cab9e89844964389cd48abe86 (patch) | |
| tree | 0bae75abc6e19ee65089e42cd98a18a18ae9359c /main.c | |
| parent | cfc447cff743d286b38aa3c686f297305148a202 (diff) | |
| download | vis-fac398accd9ef50cab9e89844964389cd48abe86.tar.gz vis-fac398accd9ef50cab9e89844964389cd48abe86.tar.xz | |
Fix a few memory leaks
Diffstat (limited to 'main.c')
| -rw-r--r-- | main.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -166,8 +166,8 @@ static void setup() { } static void cleanup() { - vis_free(vis); endwin(); + //delscreen(set_term(NULL)); } static bool keymatch(Key *key0, Key *key1) { @@ -241,7 +241,7 @@ int main(int argc, char *argv[]) { struct timeval idle = { .tv_usec = 0 }, *timeout = NULL; Key key, key_prev, *key_mod = NULL; - for (;;) { + while (vis->running) { if (screen.need_resize) { resize_screen(&screen); vis_resize(vis, screen.w, screen.h); @@ -299,6 +299,7 @@ int main(int argc, char *argv[]) { timeout = &idle; } + vis_free(vis); cleanup(); return 0; } |
