[evolution-data-server] Fix few memory leaks in calendar backends



commit 332ec27095f6b2c903d043734d5f9f19542763aa
Author: Milan Crha <mcrha redhat com>
Date:   Wed Jan 2 19:52:51 2019 +0100

    Fix few memory leaks in calendar backends

 src/calendar/backends/file/e-cal-backend-file.c       | 1 +
 src/calendar/backends/weather/e-cal-backend-weather.c | 3 +++
 2 files changed, 4 insertions(+)
---
diff --git a/src/calendar/backends/file/e-cal-backend-file.c b/src/calendar/backends/file/e-cal-backend-file.c
index 03cae6f1d..b5103ae3b 100644
--- a/src/calendar/backends/file/e-cal-backend-file.c
+++ b/src/calendar/backends/file/e-cal-backend-file.c
@@ -3300,6 +3300,7 @@ e_cal_backend_file_receive_objects (ECalBackendSync *backend,
                zone = icaltimezone_new ();
                if (icaltimezone_set_component (zone, subcomp))
                        g_hash_table_insert (tzdata.zones, g_strdup (icaltimezone_get_tzid (zone)), NULL);
+               icaltimezone_free (zone, 1);
 
                subcomp = icalcomponent_get_next_component (toplevel_comp, ICAL_VTIMEZONE_COMPONENT);
        }
diff --git a/src/calendar/backends/weather/e-cal-backend-weather.c 
b/src/calendar/backends/weather/e-cal-backend-weather.c
index 0c2de5515..17f7c5fd1 100644
--- a/src/calendar/backends/weather/e-cal-backend-weather.c
+++ b/src/calendar/backends/weather/e-cal-backend-weather.c
@@ -636,6 +636,9 @@ create_weather (ECalBackendWeather *cbw,
        description->altrep = "";
        text_list = g_slist_append (text_list, description);
        e_cal_component_set_description_list (cal_comp, text_list);
+       g_slist_free (text_list);
+       g_free ((gchar *) (description->value));
+       g_free (description);
        g_free ((gchar *) comp_summary.value);
 
        /* Set category and visibility */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]