[evolution-data-server] Fix few memory leaks
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Fix few memory leaks
- Date: Mon, 6 Jun 2011 13:18:03 +0000 (UTC)
commit 72d7dbc0250de6aa426c9a20140c07a05d1ffd1e
Author: Milan Crha <mcrha redhat com>
Date: Mon Jun 6 15:16:27 2011 +0200
Fix few memory leaks
calendar/backends/caldav/e-cal-backend-caldav.c | 3 +++
calendar/backends/file/e-cal-backend-file.c | 1 -
calendar/backends/weather/e-cal-backend-weather.c | 1 -
calendar/libedata-cal/e-data-cal.c | 2 +-
4 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/calendar/backends/caldav/e-cal-backend-caldav.c b/calendar/backends/caldav/e-cal-backend-caldav.c
index 8ccffa2..c1d68c0 100644
--- a/calendar/backends/caldav/e-cal-backend-caldav.c
+++ b/calendar/backends/caldav/e-cal-backend-caldav.c
@@ -1988,6 +1988,7 @@ synchronize_cache (ECalBackendCalDAV *cbdav, time_t start_time, time_t end_time)
}
/* cache update done for fetched items */
+ g_free (up_sobjs);
}
/* do not free 'data' itself, it's part of 'sobjs' */
@@ -2018,6 +2019,8 @@ synchronize_cache (ECalBackendCalDAV *cbdav, time_t start_time, time_t end_time)
}
g_tree_destroy (c_uid2complist);
+ g_slist_free (hrefs_to_update);
+ g_free (sobjs);
}
static gboolean
diff --git a/calendar/backends/file/e-cal-backend-file.c b/calendar/backends/file/e-cal-backend-file.c
index faa0e04..9f522d3 100644
--- a/calendar/backends/file/e-cal-backend-file.c
+++ b/calendar/backends/file/e-cal-backend-file.c
@@ -1822,7 +1822,6 @@ e_cal_backend_file_start_view (ECalBackend *backend, EDataCalView *query)
g_list_foreach (objs_occuring_in_tw, (GFunc) g_object_unref, NULL);
g_list_free (objs_occuring_in_tw);
}
- g_object_unref (match_data.obj_sexp);
e_data_cal_view_notify_complete (query, NULL /* Success */);
}
diff --git a/calendar/backends/weather/e-cal-backend-weather.c b/calendar/backends/weather/e-cal-backend-weather.c
index d1f7d9c..5bf4ee8 100644
--- a/calendar/backends/weather/e-cal-backend-weather.c
+++ b/calendar/backends/weather/e-cal-backend-weather.c
@@ -727,7 +727,6 @@ e_cal_backend_weather_start_view (ECalBackend *backend, EDataCalView *query)
g_slist_free (components);
g_slist_foreach (objects, (GFunc) g_free, NULL);
g_slist_free (objects);
- g_object_unref (sexp);
e_data_cal_view_notify_complete (query, NULL /* Success */);
}
diff --git a/calendar/libedata-cal/e-data-cal.c b/calendar/libedata-cal/e-data-cal.c
index cc09424..bbcb3b0 100644
--- a/calendar/libedata-cal/e-data-cal.c
+++ b/calendar/libedata-cal/e-data-cal.c
@@ -257,8 +257,8 @@ operation_thread (gpointer data, gpointer user_data)
}
view = e_data_cal_view_new (backend, obj_sexp);
+ g_object_unref (obj_sexp);
if (!view) {
- g_object_unref (obj_sexp);
g_free (op->d.sexp);
e_data_cal_respond_get_view (op->cal, op->id, EDC_ERROR (OtherError), NULL);
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]