about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2013-05-06 01:22:34 +0100
committerJames Booth <boothj5@gmail.com>2013-05-06 01:22:34 +0100
commitd43539bf10ab816b247c9cbf971c65d77fe2a8bd (patch)
tree867d143b06436059c4ce48a4bce78070d97a3b03 /src
parentcd06771ddf2e64d5267eacd2c8c6c97533107de2 (diff)
downloadprofani-tty-d43539bf10ab816b247c9cbf971c65d77fe2a8bd.tar.gz
Fixed memory leak
Diffstat (limited to 'src')
-rw-r--r--src/ui/core.c5
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++;