Skip to content

Commit

Permalink
b2b_entities: make sure we don't "leak" transaction when canceling it
Browse files Browse the repository at this point in the history
(cherry picked from commit 0a0a0d6)
  • Loading branch information
razvancrainea committed Jul 26, 2023
1 parent ff17335 commit 69f0358
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 @@ -2177,6 +2177,7 @@ int b2b_send_request(b2b_req_data_t* req_data)
if(dlg->uac_tran)
{
struct cell *inv_t;
struct cell *bk_t = tmb.t_gett();
LM_DBG("send cancel request\n");
if (tmb.t_lookup_ident( &inv_t, dlg->uac_tran->hash_index,
dlg->uac_tran->label) != 1) {
Expand All @@ -2185,6 +2186,7 @@ int b2b_send_request(b2b_req_data_t* req_data)
}
ret = tmb.t_cancel_trans( inv_t, &ehdr);
tmb.unref_cell(inv_t);
tmb.t_sett(bk_t);
if (dlg->state > B2B_CONFIRMED)
method_value = METHOD_INVITE;
}
Expand Down

0 comments on commit 69f0358

Please sign in to comment.