[evolution-data-server/gnome-3-38] Calendar: Fix a possible leak in e_cal_util_parse_ics_string()
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/gnome-3-38] Calendar: Fix a possible leak in e_cal_util_parse_ics_string()
- Date: Fri, 2 Oct 2020 09:43:33 +0000 (UTC)
commit 58d84e571dd2bb1b2acd5b01900cf9f7b5491260
Author: Milan Crha <mcrha redhat com>
Date: Fri Oct 2 11:38:39 2020 +0200
Calendar: Fix a possible leak in e_cal_util_parse_ics_string()
When a passed-in string contains more lines than just the iCalendar
data, then the accumulating string was allocated, but not freed,
due to missing end line.
src/calendar/libecal/e-cal-util.c | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/src/calendar/libecal/e-cal-util.c b/src/calendar/libecal/e-cal-util.c
index c042645bb..e7207f817 100644
--- a/src/calendar/libecal/e-cal-util.c
+++ b/src/calendar/libecal/e-cal-util.c
@@ -223,6 +223,9 @@ e_cal_util_parse_ics_string (const gchar *string)
g_free (line);
}
+ if (comp_str)
+ g_string_free (comp_str, TRUE);
+
return icalcomp;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]