[evolution-data-server] 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] Calendar: Fix a possible leak in e_cal_util_parse_ics_string()
- Date: Fri, 2 Oct 2020 09:41:53 +0000 (UTC)
commit de16f8a8a8ec01caa1b1ea78e79097161507841e
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 e7b66dd9d..64c3bb54a 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]