[cheese] gconf: fix a memory leak
- From: Filippo Argiolas <fargiolas src gnome org>
- To: svn-commits-list gnome org
- Subject: [cheese] gconf: fix a memory leak
- Date: Sun, 14 Jun 2009 06:03:22 -0400 (EDT)
commit 7714c30c506e11545d38180f62d044025796cdd4
Author: Filippo Argiolas <filippo argiolas gmail com>
Date: Sun Jun 14 11:59:18 2009 +0200
gconf: fix a memory leak
g_strjoin allocates a new string, so the old effect string was leaking.
src/cheese-gconf.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/cheese-gconf.c b/src/cheese-gconf.c
index 36b51e6..bf6e061 100644
--- a/src/cheese-gconf.c
+++ b/src/cheese-gconf.c
@@ -92,8 +92,11 @@ cheese_gconf_get_property (GObject *object, guint prop_id, GValue *value,
}
if (effects == NULL)
effects = g_strdup (str);
- else
+ else {
+ gchar *dummy = effects;
effects = g_strjoin (",", effects, str, NULL);
+ g_free (dummy);
+ }
g_free (tmp->data);
tmp = g_slist_next (tmp);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]