mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-19 08:11:21 +00:00
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
This commit is contained in:
@@ -120,6 +120,7 @@ static void ewscal_destructor(void *obj)
|
|||||||
if (pvt->session) {
|
if (pvt->session) {
|
||||||
ne_session_destroy(pvt->session);
|
ne_session_destroy(pvt->session);
|
||||||
}
|
}
|
||||||
|
ne_uri_free(&pvt->uri);
|
||||||
ast_string_field_free_memory(pvt);
|
ast_string_field_free_memory(pvt);
|
||||||
|
|
||||||
ao2_callback(pvt->events, OBJ_UNLINK | OBJ_NODATA | OBJ_MULTIPLE, NULL, NULL);
|
ao2_callback(pvt->events, OBJ_UNLINK | OBJ_NODATA | OBJ_MULTIPLE, NULL, NULL);
|
||||||
|
|||||||
@@ -226,6 +226,7 @@ static void exchangecal_destructor(void *obj)
|
|||||||
if (pvt->session) {
|
if (pvt->session) {
|
||||||
ne_session_destroy(pvt->session);
|
ne_session_destroy(pvt->session);
|
||||||
}
|
}
|
||||||
|
ne_uri_free(&pvt->uri);
|
||||||
ast_string_field_free_memory(pvt);
|
ast_string_field_free_memory(pvt);
|
||||||
|
|
||||||
ao2_callback(pvt->events, OBJ_UNLINK | OBJ_NODATA | OBJ_MULTIPLE, NULL, NULL);
|
ao2_callback(pvt->events, OBJ_UNLINK | OBJ_NODATA | OBJ_MULTIPLE, NULL, NULL);
|
||||||
|
|||||||
@@ -80,6 +80,7 @@ static void icalendar_destructor(void *obj)
|
|||||||
if (pvt->data) {
|
if (pvt->data) {
|
||||||
icalcomponent_free(pvt->data);
|
icalcomponent_free(pvt->data);
|
||||||
}
|
}
|
||||||
|
ne_uri_free(&pvt->uri);
|
||||||
ast_string_field_free_memory(pvt);
|
ast_string_field_free_memory(pvt);
|
||||||
|
|
||||||
ao2_callback(pvt->events, OBJ_UNLINK | OBJ_NODATA | OBJ_MULTIPLE, NULL, NULL);
|
ao2_callback(pvt->events, OBJ_UNLINK | OBJ_NODATA | OBJ_MULTIPLE, NULL, NULL);
|
||||||
|
|||||||
Reference in New Issue
Block a user