Skip to content

Commit

Permalink
b2b_entities: 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 43ffc3d)
  • Loading branch information
liviuchircu committed Nov 18, 2022
1 parent 1dc9643 commit 4a18a0a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions modules/b2b_entities/b2be_clustering.c
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,7 @@ int receive_entity_create(bin_packet_t *packet, b2b_dlg_t *dlg, int type,
new_key = b2b_htable_insert(htable, new_dlg, hash_index, (time_t)timestamp,
type, 1, 1);
if (new_key == NULL) {
lock_release(&htable[hash_index].lock);
LM_ERR("Failed to insert new record\n");
goto error;
}
Expand Down

0 comments on commit 4a18a0a

Please sign in to comment.