aboutsummaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorpitel <pitel@f38db490-d61c-443f-a65b-d21fe96a405b>2011-01-04 17:01:52 +0000
committerpitel <pitel@f38db490-d61c-443f-a65b-d21fe96a405b>2011-01-04 17:01:52 +0000
commit5184271c95b0c0a17756023bc6399d8dca5387b2 (patch)
tree576e259298903ec681306422fb4beaee821f1fdf /res
parent961c60921c1b326ac6d702f994b4c8cc00527dc0 (diff)
Memory leaking in calendars
ne_request_destroy() was missing in icalendar and exchange calendar modules, causing memory leak. (closes issue #18521) Review: https://reviewboard.asterisk.org/r/1068/ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@300214 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res')
-rw-r--r--res/res_calendar_exchange.c1
-rw-r--r--res/res_calendar_icalendar.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/res/res_calendar_exchange.c b/res/res_calendar_exchange.c
index 8f3989c5d..2238124db 100644
--- a/res/res_calendar_exchange.c
+++ b/res/res_calendar_exchange.c
@@ -403,6 +403,7 @@ static struct ast_str *exchangecal_request(struct exchangecal_pvt *pvt, const ch
ne_add_request_header(req, "Content-type", "text/xml");
ret = ne_request_dispatch(req);
+ ne_request_destroy(req);
if (ret != NE_OK || !ast_str_strlen(response)) {
ast_log(LOG_WARNING, "Unknown response to CalDAV calendar %s, request %s to %s: %s\n", pvt->owner->name, method, pvt->url, ne_get_error(pvt->session));
diff --git a/res/res_calendar_icalendar.c b/res/res_calendar_icalendar.c
index d91cd0fe0..d503eac35 100644
--- a/res/res_calendar_icalendar.c
+++ b/res/res_calendar_icalendar.c
@@ -142,6 +142,7 @@ static icalcomponent *fetch_icalendar(struct icalendar_pvt *pvt)
ne_add_response_body_reader(req, ne_accept_2xx, fetch_response_reader, &response);
ret = ne_request_dispatch(req);
+ ne_request_destroy(req);
if (ret != NE_OK || !ast_str_strlen(response)) {
ast_log(LOG_WARNING, "Unable to retrieve iCalendar '%s' from '%s': %s\n", pvt->owner->name, pvt->url, ne_get_error(pvt->session));
ast_free(response);