Skip to content

Commit

Permalink
b2b_entities: Fix missing lock release on SIP parsing errors
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 a379e93)
  • Loading branch information
liviuchircu committed Nov 18, 2022
1 parent ae59f85 commit b27c915
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modules/b2b_entities/dlg.c
Original file line number Diff line number Diff line change
Expand Up @@ -1618,13 +1618,15 @@ int b2b_send_reply(b2b_rpl_data_t* rpl_data)

if(parse_headers(msg, HDR_EOH_F, 0) < 0)
{
B2BE_LOCK_RELEASE(table, hash_index);
LM_ERR("Failed to parse headers\n");
return 0;
}

pto = get_to(msg);
if (pto == NULL || pto->error != PARSE_OK)
{
B2BE_LOCK_RELEASE(table, hash_index);
LM_ERR("'To' header COULD NOT parsed\n");
return 0;
}
Expand Down

0 comments on commit b27c915

Please sign in to comment.