mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-04 11:58:52 +00:00
res_calendar: Plug memory leak and micro-optimization
ast_variables_destroy is NULL safe, so there is no need to check its argument before passing it. ASTERISK-25524 #close Reported by: Jesper Change-Id: Ib0f8057642e9d471960f1a79fd42e5a3ce587d3b
This commit is contained in:
@@ -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