Skip to content

Commit

Permalink
fraud_detection: Fix missing lock_release() on OOM error case
Browse files Browse the repository at this point in the history
Credits to @ryancaicse for the report in #2714
  • Loading branch information
liviuchircu committed Dec 20, 2021
1 parent 1e5dd94 commit 80eeb52
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions modules/fraud_detection/fraud_detection.c
Expand Up @@ -335,6 +335,7 @@ static int check_fraud(struct sip_msg *msg, str *user, str *number, int *pid)
} else {
if (shm_str_sync(&se->stats.last_dial, number) != 0) {
lock_release(frd_seq_calls_lock);
lock_release(&se->lock);
LM_ERR("oom\n");
rc = rc_error;
goto out;
Expand Down

0 comments on commit 80eeb52

Please sign in to comment.