[metacity] fix memory leak in theme optimisation



commit bc14af3aaa0cd4c51d4558209adf2fee9878b071
Author: Lin Ma <lin ma sun com>
Date:   Sun May 2 11:58:28 2010 -0400

    fix memory leak in theme optimisation

 src/ui/theme.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/ui/theme.c b/src/ui/theme.c
index 175eb5b..7e4859d 100644
--- a/src/ui/theme.c
+++ b/src/ui/theme.c
@@ -2559,11 +2559,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;
             }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]