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 fdaddb7 commit 46e889e
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 @@ -2399,6 +2399,7 @@ int _b2b_send_request(b2b_dlg_t* dlg, 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 @@ -2408,6 +2409,7 @@ int _b2b_send_request(b2b_dlg_t* dlg, b2b_req_data_t* req_data)
// FIXME - tracing: how do we get to the cancel transaction?
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 46e889e

Please sign in to comment.