[mutter] theme.c: Squash memory leak
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] theme.c: Squash memory leak
- Date: Wed, 11 May 2011 18:15:05 +0000 (UTC)
commit d0414a3ea697738dcdf2641b6a8000df35215862
Author: Colin Walters <walters verbum org>
Date: Thu May 5 16:46:00 2011 -0400
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 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/ui/theme.c b/src/ui/theme.c
index 0077388..9305645 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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]