From dceedb11ac8d9d1dfb42e4b01ef8705c535011fd Mon Sep 17 00:00:00 2001 From: Polonkai Gergely Date: Mon, 21 May 2012 14:17:34 +0000 Subject: [PATCH] Now freeing previous menu list upon menu loading if any Signed-off-by: Gergely POLONKAI (W00d5t0ck) --- wmud/menu.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wmud/menu.c b/wmud/menu.c index 72a0041..1377147 100644 --- a/wmud/menu.c +++ b/wmud/menu.c @@ -222,7 +222,10 @@ wmud_menu_init(GSList **menu) return FALSE; } - /* TODO: free previous menu list, if *menu is not NULL */ + if (*menu) + { + wmud_menu_items_free(menu_items); + } *menu = menu_items; cmdtable = g_hash_table_new(g_str_hash, g_str_equal);