[sr-dev] git:master:ec0c583b: tm: safety check for t->uas.request for forwarding local requests
Daniel-Constantin Mierla
miconda at gmail.com
Wed Aug 15 12:24:25 CEST 2018
Module: kamailio
Branch: master
Commit: ec0c583b5b054d06691a2c0d90be195f6ed51cdd
URL: https://github.com/kamailio/kamailio/commit/ec0c583b5b054d06691a2c0d90be195f6ed51cdd
Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2018-08-15T12:23:51+02:00
tm: safety check for t->uas.request for forwarding local requests
---
Modified: src/modules/tm/t_fwd.c
---
Diff: https://github.com/kamailio/kamailio/commit/ec0c583b5b054d06691a2c0d90be195f6ed51cdd.diff
Patch: https://github.com/kamailio/kamailio/commit/ec0c583b5b054d06691a2c0d90be195f6ed51cdd.patch
---
diff --git a/src/modules/tm/t_fwd.c b/src/modules/tm/t_fwd.c
index 4ebafee167..985b96f190 100644
--- a/src/modules/tm/t_fwd.c
+++ b/src/modules/tm/t_fwd.c
@@ -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 */
@@ -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;
}
More information about the sr-dev
mailing list