Skip to content

Commit

Permalink
presence: reset freed list to avoid double free in case of error
Browse files Browse the repository at this point in the history
(cherry picked from commit 28dc74f)
  • Loading branch information
miconda committed Sep 24, 2019
1 parent 3425fba commit ffec32d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/modules/presence/event_list.c
Expand Up @@ -150,6 +150,7 @@ int add_event(pres_ev_t* event)
if(ev== NULL)
{
free_event_params(parsed_event.params.list, PKG_MEM_TYPE);
parsed_event.params.list = NULL;
ERR_MEM(SHARE_MEM);
}
memset(ev, 0, sizeof(pres_ev_t));
Expand Down

0 comments on commit ffec32d

Please sign in to comment.