Skip to content

Commit

Permalink
b2b_logic: Fix missing lock release on OOM error case
Browse files Browse the repository at this point in the history
Many thanks to Ryan Caicse (@ryancaicse) for reporting this bug!

(cherry picked from commit b5646bd)
  • Loading branch information
liviuchircu committed Nov 18, 2022
1 parent 8efeafb commit 1dc9643
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions modules/b2b_logic/logic.c
Original file line number Diff line number Diff line change
Expand Up @@ -1508,6 +1508,7 @@ int b2b_logic_notify_request(int src, struct sip_msg* msg, str* key, str* body,
avp_val.s = *b2bl_key;
if(add_avp(AVP_VAL_STR|b2bl_key_avp_type, b2bl_key_avp_name, avp_val)!=0)
{
lock_release(&b2bl_htable[hash_index].lock);
LM_ERR("failed to build b2bl_key avp\n");
return -1;
}
Expand Down

0 comments on commit 1dc9643

Please sign in to comment.