mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-17 15:29:05 +00:00
Merge "res_calendar: Plug memory leak and micro-optimization"
This commit is contained in:
@@ -339,10 +339,7 @@ static void calendar_destructor(void *obj)
|
||||
}
|
||||
ast_calendar_clear_events(cal);
|
||||
ast_string_field_free_memory(cal);
|
||||
if (cal->vars) {
|
||||
ast_variables_destroy(cal->vars);
|
||||
cal->vars = NULL;
|
||||
}
|
||||
ast_variables_destroy(cal->vars);
|
||||
ao2_ref(cal->events, -1);
|
||||
ao2_unlock(cal);
|
||||
}
|
||||
|
||||
@@ -78,6 +78,7 @@ static void caldav_destructor(void *obj)
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user