[gnome-calendar/calendar-editor] source-dialog: fix memory leak
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar/calendar-editor] source-dialog: fix memory leak
- Date: Sat, 23 May 2015 01:54:48 +0000 (UTC)
commit be792cbe11282ba283db3874eaa65bf570da3e6a
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Fri May 22 22:54:11 2015 -0300
source-dialog: fix memory leak
Free duplicated string when the listbox row is
destroyed.
src/gcal-source-dialog.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/src/gcal-source-dialog.c b/src/gcal-source-dialog.c
index bc2bcf0..60b913c 100644
--- a/src/gcal-source-dialog.c
+++ b/src/gcal-source-dialog.c
@@ -1577,10 +1577,9 @@ discover_sources_cb (GObject *source,
g_object_set_data (G_OBJECT (row), "parent-source", source);
g_object_set_data (G_OBJECT (row), "source", new_source);
- g_object_set_data (G_OBJECT (row), "source-url", g_strdup (src->href));
- g_object_set_data (G_OBJECT (row), "source-color", g_strdup (src->color));
- g_object_set_data (G_OBJECT (row), "source-display-name", g_strdup (src->display_name));
- //g_object_set_data (G_OBJECT (row), "source-email", g_strdup (g_slist_nth_data (user_adresses,
counter)));
+ g_object_set_data_full (G_OBJECT (row), "source-url", g_strdup (src->href), g_free);
+ g_object_set_data_full (G_OBJECT (row), "source-color", g_strdup (src->color), g_free);
+ g_object_set_data_full (G_OBJECT (row), "source-display-name", g_strdup (src->display_name),
g_free);
gtk_widget_show_all (row);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]