[asterisk-commits] mjordan: branch 11 r380452 - in /branches/11: ./ res/res_calendar_icalendar.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Jan 30 08:15:31 CST 2013
Author: mjordan
Date: Wed Jan 30 08:15:27 2013
New Revision: 380452
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=380452
Log:
Fix memory leak in res_calendar_icalendar
The ICalendar module had a systemic memory leak on each fetch of data from
the ICalendar source. The previous fetched data was not being properly
disposed. This patch makes it so that before each fetch of data, we dispose
of the previously fetched data.
(closes issue ASTERISK-21012)
Reported by: Joel Vandal
Tested by: Joel Vandal
........
Merged revisions 380451 from http://svn.asterisk.org/svn/asterisk/branches/1.8
Modified:
branches/11/ (props changed)
branches/11/res/res_calendar_icalendar.c
Propchange: branches/11/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.
Modified: branches/11/res/res_calendar_icalendar.c
URL: http://svnview.digium.com/svn/asterisk/branches/11/res/res_calendar_icalendar.c?view=diff&rev=380452&r1=380451&r2=380452
==============================================================================
--- branches/11/res/res_calendar_icalendar.c (original)
+++ branches/11/res/res_calendar_icalendar.c Wed Jan 30 08:15:27 2013
@@ -468,6 +468,11 @@
ast_debug(10, "Refreshing after %d minute timeout\n", pvt->owner->refresh);
+ /* Free the old calendar data */
+ if (pvt->data) {
+ icalcomponent_free(pvt->data);
+ pvt->data = NULL;
+ }
if (!(pvt->data = fetch_icalendar(pvt))) {
ast_log(LOG_WARNING, "Unable to parse iCalendar '%s'\n", pvt->owner->name);
continue;
More information about the asterisk-commits
mailing list