diff options
-rw-r--r-- | src/ui/core.c | 1 | ||||
-rw-r--r-- | src/ui/window.c | 2 | ||||
-rw-r--r-- | src/ui/windows.c | 11 | ||||
-rw-r--r-- | src/ui/windows.h | 1 |
4 files changed, 13 insertions, 2 deletions
diff --git a/src/ui/core.c b/src/ui/core.c index 97825c95..0f928204 100644 --- a/src/ui/core.c +++ b/src/ui/core.c @@ -135,6 +135,7 @@ void ui_close(void) { notifier_uninit(); + wins_destroy(); endwin(); } diff --git a/src/ui/window.c b/src/ui/window.c index b78a240f..7c6f9266 100644 --- a/src/ui/window.c +++ b/src/ui/window.c @@ -57,8 +57,6 @@ win_free(ProfWin* window) { delwin(window->win); free(window->from); - window->from = NULL; - window->win = NULL; free(window); window = NULL; } diff --git a/src/ui/windows.c b/src/ui/windows.c index 3f5d2d6b..c55dad74 100644 --- a/src/ui/windows.c +++ b/src/ui/windows.c @@ -455,3 +455,14 @@ wins_create_summary(void) return result; } + +void +wins_destroy(void) +{ + int i; + for (i = 0; i < NUM_WINS; i++) { + if (windows[i] != NULL) { + win_free(windows[i]); + } + } +} diff --git a/src/ui/windows.h b/src/ui/windows.h index 775cb79d..ee4d1c84 100644 --- a/src/ui/windows.h +++ b/src/ui/windows.h @@ -47,5 +47,6 @@ GSList * wins_get_prune_recipients(void); void wins_lost_connection(void); gboolean wins_tidy(void); GSList * wins_create_summary(void); +void wins_destroy(void); #endif |