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)
(cherry picked from commit ffec32d)
  • Loading branch information
miconda committed Sep 24, 2019
1 parent e6f8c18 commit 2357b75
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 2357b75

Please sign in to comment.