[evolution-data-server/gnome-3-16] Fix various memory leaks
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/gnome-3-16] Fix various memory leaks
- Date: Tue, 21 Apr 2015 19:07:52 +0000 (UTC)
commit 4c6102031616d211fe83a84f57683a4beeb8e27a
Author: Milan Crha <mcrha redhat com>
Date: Tue Apr 21 21:02:33 2015 +0200
Fix various memory leaks
calendar/backends/file/e-cal-backend-file.c | 10 +++++++---
calendar/backends/http/e-cal-backend-http.c | 2 +-
2 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/calendar/backends/file/e-cal-backend-file.c b/calendar/backends/file/e-cal-backend-file.c
index e0b16a2..6e87271 100644
--- a/calendar/backends/file/e-cal-backend-file.c
+++ b/calendar/backends/file/e-cal-backend-file.c
@@ -645,9 +645,11 @@ add_component_to_intervaltree (ECalBackendFile *cbfile,
resolve_tzid, priv->icalcomp, icaltimezone_get_utc_timezone (),
e_cal_backend_get_kind (E_CAL_BACKEND (cbfile)));
- if (time_end != -1 && time_start > time_end)
- g_print ("Bogus component %s\n", e_cal_component_get_as_string (comp));
- else
+ if (time_end != -1 && time_start > time_end) {
+ gchar *str = e_cal_component_get_as_string (comp);
+ g_print ("Bogus component %s\n", str);
+ g_free (str);
+ } else
e_intervaltree_insert (priv->interval_tree, time_start, time_end, comp);
return FALSE;
@@ -1065,8 +1067,10 @@ free_refresh_data (ECalBackendFile *cbfile)
g_cond_wait (priv->refresh_gone_cond, &priv->refresh_lock);
g_cond_clear (priv->refresh_cond);
+ g_free (priv->refresh_cond);
priv->refresh_cond = NULL;
g_cond_clear (priv->refresh_gone_cond);
+ g_free (priv->refresh_gone_cond);
priv->refresh_gone_cond = NULL;
}
diff --git a/calendar/backends/http/e-cal-backend-http.c b/calendar/backends/http/e-cal-backend-http.c
index 55b5db0..299d156 100644
--- a/calendar/backends/http/e-cal-backend-http.c
+++ b/calendar/backends/http/e-cal-backend-http.c
@@ -995,7 +995,7 @@ e_cal_backend_http_open (ECalBackendSync *backend,
g_free (certificate_pem);
if (local_error != NULL)
- g_propagate_error (perror, g_error_copy (local_error));
+ g_propagate_error (perror, local_error);
}
if (opened) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]