Skip to content

Commit

Permalink
dialog: Fix shm memleak on OOM error case
Browse files Browse the repository at this point in the history
  • Loading branch information
liviuchircu committed Sep 6, 2022
1 parent 88014bf commit 6d03091
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions modules/dialog/dlg_repl_profile.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ static inline struct prof_local_count *get_local_counter(
memset(cnt, 0, sizeof *cnt);

if (shtag->len && shm_str_dup(&cnt->shtag, shtag) < 0) {
shm_free(cnt);
LM_ERR("oom\n");
return NULL;
}
Expand Down

0 comments on commit 6d03091

Please sign in to comment.