[Asterisk-code-review] res_calendar: Resolve memory leak on calendar destruction (...asterisk[16])
Joshua Colp
asteriskteam at digium.com
Tue Oct 29 10:24:29 CDT 2019
Joshua Colp has submitted this change and it was merged. ( https://gerrit.asterisk.org/c/asterisk/+/13108 )
Change subject: res_calendar: Resolve memory leak on calendar destruction
......................................................................
res_calendar: Resolve memory leak on calendar destruction
Calling ne_uri_parse allocates memory that needs to be freed with a
corresponding call to ne_uri_free.
ASTERISK-28572 #close
Change-Id: I8a6834da27000a6807d89cb7a157b2a88fcb5e61
---
M res/res_calendar_ews.c
M res/res_calendar_exchange.c
M res/res_calendar_icalendar.c
3 files changed, 3 insertions(+), 0 deletions(-)
Approvals:
Joshua Colp: Looks good to me, but someone else must approve; Approved for Submit
George Joseph: Looks good to me, approved
diff --git a/res/res_calendar_ews.c b/res/res_calendar_ews.c
index c12fb01..e4d250c 100644
--- a/res/res_calendar_ews.c
+++ b/res/res_calendar_ews.c
@@ -118,6 +118,7 @@
if (pvt->session) {
ne_session_destroy(pvt->session);
}
+ ne_uri_free(&pvt->uri);
ast_string_field_free_memory(pvt);
ao2_callback(pvt->events, OBJ_UNLINK | OBJ_NODATA | OBJ_MULTIPLE, NULL, NULL);
diff --git a/res/res_calendar_exchange.c b/res/res_calendar_exchange.c
index 21c1c1a..6d624c1 100644
--- a/res/res_calendar_exchange.c
+++ b/res/res_calendar_exchange.c
@@ -224,6 +224,7 @@
if (pvt->session) {
ne_session_destroy(pvt->session);
}
+ ne_uri_free(&pvt->uri);
ast_string_field_free_memory(pvt);
ao2_callback(pvt->events, OBJ_UNLINK | OBJ_NODATA | OBJ_MULTIPLE, NULL, NULL);
diff --git a/res/res_calendar_icalendar.c b/res/res_calendar_icalendar.c
index 4f78f9a..debb55c 100644
--- a/res/res_calendar_icalendar.c
+++ b/res/res_calendar_icalendar.c
@@ -78,6 +78,7 @@
if (pvt->data) {
icalcomponent_free(pvt->data);
}
+ ne_uri_free(&pvt->uri);
ast_string_field_free_memory(pvt);
ao2_callback(pvt->events, OBJ_UNLINK | OBJ_NODATA | OBJ_MULTIPLE, NULL, NULL);
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/13108
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: I8a6834da27000a6807d89cb7a157b2a88fcb5e61
Gerrit-Change-Number: 13108
Gerrit-PatchSet: 1
Gerrit-Owner: Sean Bright <sean.bright at gmail.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20191029/8ba39ed1/attachment-0001.html>
More information about the asterisk-code-review
mailing list