Module: kamailio Branch: master Commit: f93d3c70b1b14665ddc11ca2c39e1d114390e5f9 URL: https://github.com/kamailio/kamailio/commit/f93d3c70b1b14665ddc11ca2c39e1d11...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2015-05-14T10:17:56+02:00
dispatcher: init socket pointer to null
- covers all situations, also when the afferent avp name is not set
---
Modified: modules/dispatcher/dispatch.c
---
Diff: https://github.com/kamailio/kamailio/commit/f93d3c70b1b14665ddc11ca2c39e1d11... Patch: https://github.com/kamailio/kamailio/commit/f93d3c70b1b14665ddc11ca2c39e1d11...
---
diff --git a/modules/dispatcher/dispatch.c b/modules/dispatcher/dispatch.c index 1a0b41a..7491a5f 100644 --- a/modules/dispatcher/dispatch.c +++ b/modules/dispatcher/dispatch.c @@ -2055,7 +2055,7 @@ int ds_next_dst(struct sip_msg *msg, int mode) struct search_state st; struct usr_avp *avp; struct usr_avp *prev_avp; - struct socket_info *sock; + struct socket_info *sock = NULL; int_str avp_value; int_str sock_avp_value; int alg = 0; @@ -2098,8 +2098,6 @@ int ds_next_dst(struct sip_msg *msg, int mode) if (sscanf( sock_avp_value.s.s, "%p", (void**)&sock ) != 1) sock = NULL; destroy_avp(prev_avp); - } else { - sock = NULL; } }