aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2008-07-03 17:32:25 +0800
committerMilan Crha <mcrha@src.gnome.org>2008-07-03 17:32:25 +0800
commitcaa0a3d44c74e440d5de07f770583491549edb82 (patch)
tree0c5d97589f8fb63266fc3b1801a358ff9f4d8abf
parentea3b220f0497a14ec15408dfdfab7d5d693974b8 (diff)
downloadgsoc2013-evolution-caa0a3d44c74e440d5de07f770583491549edb82.tar
gsoc2013-evolution-caa0a3d44c74e440d5de07f770583491549edb82.tar.gz
gsoc2013-evolution-caa0a3d44c74e440d5de07f770583491549edb82.tar.bz2
gsoc2013-evolution-caa0a3d44c74e440d5de07f770583491549edb82.tar.lz
gsoc2013-evolution-caa0a3d44c74e440d5de07f770583491549edb82.tar.xz
gsoc2013-evolution-caa0a3d44c74e440d5de07f770583491549edb82.tar.zst
gsoc2013-evolution-caa0a3d44c74e440d5de07f770583491549edb82.zip
** Fix for bug #540152
2008-07-03 Milan Crha <mcrha@redhat.com> ** Fix for bug #540152 * addressbook/gui/component/addressbook-component.c: (ensure_sources): Unref source only when we created it - the list owns the pointer now. * calendar/gui/calendar-component.c: (ensure_sources): Unref sources only when we created it - the list owns the pointer now. * calendar/gui/tasks-component.c: (ensure_sources): * calendar/gui/memos-component.c: (ensure_sources): Do not leak ESource. svn path=/trunk/; revision=35717
-rw-r--r--addressbook/ChangeLog7
-rw-r--r--addressbook/gui/component/addressbook-component.c4
-rw-r--r--calendar/ChangeLog9
-rw-r--r--calendar/gui/calendar-component.c7
-rw-r--r--calendar/gui/memos-component.c1
-rw-r--r--calendar/gui/tasks-component.c1
6 files changed, 22 insertions, 7 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index 650d267a79..c3432bf9d5 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,3 +1,10 @@
+2008-07-03 Milan Crha <mcrha@redhat.com>
+
+ ** Fix for bug #540152
+
+ * gui/component/addressbook-component.c: (ensure_sources):
+ Unref source only when we created it - the list owns the pointer now.
+
2008-06-24 Milan Crha <mcrha@redhat.com>
** Fix for bug #539755
diff --git a/addressbook/gui/component/addressbook-component.c b/addressbook/gui/component/addressbook-component.c
index 55e9535840..b55cb9bd16 100644
--- a/addressbook/gui/component/addressbook-component.c
+++ b/addressbook/gui/component/addressbook-component.c
@@ -151,6 +151,7 @@ ensure_sources (AddressbookComponent *component)
/* Create the default Person addressbook */
ESource *source = e_source_new (_("Personal"), PERSONAL_RELATIVE_URI);
e_source_group_add_source (on_this_computer, source, -1);
+ g_object_unref (source);
e_source_set_property (source, "completion", "true");
@@ -164,8 +165,7 @@ ensure_sources (AddressbookComponent *component)
on_ldap_servers = group;
}
- if (personal_source)
- g_object_unref (personal_source);
+
g_free (base_uri_proto);
g_free (base_uri);
}
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index d10562a230..8890121ca9 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,12 @@
+2008-07-03 Milan Crha <mcrha@redhat.com>
+
+ ** Fix for bug #540152
+
+ * gui/calendar-component.c: (ensure_sources):
+ Unref sources only when we created it - the list owns the pointer now.
+ * gui/tasks-component.c: (ensure_sources):
+ * gui/memos-component.c: (ensure_sources): Do not leak ESource.
+
2008-06-16 Maciej Piechotka <uzytkownik2@gmail.com>
* gui/caltypes.xml:
diff --git a/calendar/gui/calendar-component.c b/calendar/gui/calendar-component.c
index dc5645b530..4916bccfeb 100644
--- a/calendar/gui/calendar-component.c
+++ b/calendar/gui/calendar-component.c
@@ -247,6 +247,7 @@ ensure_sources (CalendarComponent *component)
/* Create the default Person addressbook */
personal_source = e_source_new (_("Personal"), PERSONAL_RELATIVE_URI);
e_source_group_add_source (on_this_computer, personal_source, -1);
+ g_object_unref (personal_source);
calendars_selected = calendar_config_get_calendars_selected ();
if (!primary_calendar && !calendars_selected) {
@@ -295,6 +296,7 @@ ensure_sources (CalendarComponent *component)
if (!birthdays_source) {
birthdays_source = e_source_new (_("Birthdays & Anniversaries"), "/");
e_source_group_add_source (contacts, birthdays_source, -1);
+ g_object_unref (birthdays_source);
}
if (!e_source_get_property (birthdays_source, "delete"))
@@ -312,11 +314,6 @@ ensure_sources (CalendarComponent *component)
component->priv->source_list = source_list;
- if (personal_source)
- g_object_unref (personal_source);
- if (birthdays_source)
- g_object_unref (birthdays_source);
-
g_free (base_uri_proto);
g_free (base_uri);
}
diff --git a/calendar/gui/memos-component.c b/calendar/gui/memos-component.c
index 941862a6af..df17624f75 100644
--- a/calendar/gui/memos-component.c
+++ b/calendar/gui/memos-component.c
@@ -208,6 +208,7 @@ ensure_sources (MemosComponent *component)
/* Create the default Person addressbook */
ESource *source = e_source_new (_("Personal"), PERSONAL_RELATIVE_URI);
e_source_group_add_source (on_this_computer, source, -1);
+ g_object_unref (source);
memos_selected = calendar_config_get_memos_selected ();
diff --git a/calendar/gui/tasks-component.c b/calendar/gui/tasks-component.c
index 28a2fd9964..61363fa02b 100644
--- a/calendar/gui/tasks-component.c
+++ b/calendar/gui/tasks-component.c
@@ -204,6 +204,7 @@ ensure_sources (TasksComponent *component)
/* Create the default Person addressbook */
ESource *source = e_source_new (_("Personal"), PERSONAL_RELATIVE_URI);
e_source_group_add_source (on_this_computer, source, -1);
+ g_object_unref (source);
tasks_selected = calendar_config_get_tasks_selected ();