Skip to content

Commit

Permalink
tm: safety check for t->uas.request for forwarding local requests
Browse files Browse the repository at this point in the history
(cherry picked from commit ec0c583)
  • Loading branch information
miconda committed Aug 17, 2018
1 parent 87c628f commit 9b82bf9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/modules/tm/t_fwd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1718,7 +1718,7 @@ int t_forward_nonack( struct cell *t, struct sip_msg* p_msg,
setbflagsval(0, backup_bflags);

/* update message flags, if changed in branch route */
t->uas.request->flags = p_msg->flags;
if(t->uas.request) t->uas.request->flags = p_msg->flags;

/* don't forget to clear all branches processed so far */

Expand Down Expand Up @@ -1782,7 +1782,7 @@ int t_forward_nonack( struct cell *t, struct sip_msg* p_msg,
/* restore backup flags from initial env */
setbflagsval(0, backup_bflags);
/* update message flags, if changed in branch route */
t->uas.request->flags = p_msg->flags;
if(t->uas.request) t->uas.request->flags = p_msg->flags;
ser_error=E_CANCELED;
return -1;
}
Expand Down

0 comments on commit 9b82bf9

Please sign in to comment.