qulogic/libgnt
Clone
Summary
Browse
Changes
Graph
Plug a small leak.
2007-12-05, Sadrul Habib Chowdhury
44d3aadfa1f7
Parents
e41193ed22b5
Children
6a138f717699
168a3f82bd43
Plug a small leak.
1 files changed, 4 insertions(+), 2 deletions(-)
+4
-2
gntstyle.c
--- a/gntstyle.c Mon Dec 03 07:02:48 2007 +0000
+++ b/gntstyle.c Wed Dec 05 00:42:26 2007 +0000
@@ -66,13 +66,15 @@
int fg = 0, bg = 0;
gsize n;
char **vals;
+ int ret = 0;
vals = gnt_style_get_string_list(group, key, &n);
if (vals && n == 2) {
fg = gnt_colors_get_color(vals[0]);
bg = gnt_colors_get_color(vals[1]);
- return gnt_color_add_pair(fg, bg);
+ ret = gnt_color_add_pair(fg, bg);
}
- return 0;
+ g_strfreev(vals);
+ return ret;
#else
return 0;
#endif