[evolution-data-server/gnome-3-30] Fix few memory leaks in calendar backends



commit ced6084fa83ebf01160f866db4bcb9f9b552faab
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 438dd7a48..0a997d490 100644
--- a/src/calendar/backends/file/e-cal-backend-file.c
+++ b/src/calendar/backends/file/e-cal-backend-file.c
@@ -3293,6 +3293,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]