From d43539bf10ab816b247c9cbf971c65d77fe2a8bd Mon Sep 17 00:00:00 2001 From: James Booth Date: Mon, 6 May 2013 01:22:34 +0100 Subject: [PATCH] Fixed memory leak --- src/ui/core.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ui/core.c b/src/ui/core.c index ea558e3f..2d16e46e 100644 --- a/src/ui/core.c +++ b/src/ui/core.c @@ -780,7 +780,10 @@ ui_duck_result(const char * const result) win_print_time(windows[win_index], '-'); } else { gchar *string = g_ucs4_to_utf8(&unichar, 1, NULL, NULL, NULL); - wprintw(windows[win_index]->win, string); + if (string != NULL) { + wprintw(windows[win_index]->win, string); + g_free(string); + } } offset++;