# HG changeset patch # User Sadrul Habib Chowdhury # Date 1254333316 0 # Node ID f22eadbdc5d192493e8e25ea965b12c3103c735b # Parent 7eaf2561b6ddd80883b3c89900b160100707ace1 Plug leaks from incorrect color types/names in gntrc. diff -r 7eaf2561b6dd -r f22eadbdc5d1 finch/libgnt/gntcolors.c --- a/finch/libgnt/gntcolors.c Wed Sep 30 15:20:25 2009 +0000 +++ b/finch/libgnt/gntcolors.c Wed Sep 30 17:55:16 2009 +0000 @@ -208,8 +208,10 @@ key = g_ascii_strdown(key, -1); color = gnt_colors_get_color(key); g_free(key); - if (color == -EINVAL) + if (color == -EINVAL) { + g_strfreev(list); continue; + } init_color(color, r, g, b); } @@ -251,8 +253,10 @@ int bg = gnt_colors_get_color(bgc); g_free(fgc); g_free(bgc); - if (fg == -EINVAL || bg == -EINVAL) + if (fg == -EINVAL || bg == -EINVAL) { + g_strfreev(list); continue; + } key = g_ascii_strdown(key, -1); @@ -275,6 +279,7 @@ else if (strcmp(key, "urgent") == 0) type = GNT_COLOR_URGENT; else { + g_strfreev(list); g_free(key); continue; }