diff options
author | James Booth <boothj5@gmail.com> | 2013-05-06 01:22:34 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2013-05-06 01:22:34 +0100 |
commit | d43539bf10ab816b247c9cbf971c65d77fe2a8bd (patch) | |
tree | 867d143b06436059c4ce48a4bce78070d97a3b03 /src/ui | |
parent | cd06771ddf2e64d5267eacd2c8c6c97533107de2 (diff) | |
download | profani-tty-d43539bf10ab816b247c9cbf971c65d77fe2a8bd.tar.gz |
Fixed memory leak
Diffstat (limited to 'src/ui')
-rw-r--r-- | src/ui/core.c | 5 |
1 files changed, 4 insertions, 1 deletions
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++; |