From d0414a3ea697738dcdf2641b6a8000df35215862 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Thu, 5 May 2011 16:46:00 -0400 Subject: [PATCH] theme.c: Squash memory leak When converting a token to a different type, we need to free its string. https://bugzilla.gnome.org/show_bug.cgi?id=649500 --- src/ui/theme.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ui/theme.c b/src/ui/theme.c index 007738868..9305645a1 100644 --- a/src/ui/theme.c +++ b/src/ui/theme.c @@ -2639,11 +2639,13 @@ meta_theme_replace_constants (MetaTheme *theme, { if (meta_theme_lookup_int_constant (theme, t->d.v.name, &ival)) { + g_free (t->d.v.name); t->type = POS_TOKEN_INT; t->d.i.val = ival; } else if (meta_theme_lookup_float_constant (theme, t->d.v.name, &dval)) { + g_free (t->d.v.name); t->type = POS_TOKEN_DOUBLE; t->d.d.val = dval; }