[sr-dev] git:master:f93d3c70: dispatcher: init socket pointer to null
Daniel-Constantin Mierla
miconda at gmail.com
Thu May 14 12:00:28 CEST 2015
Module: kamailio
Branch: master
Commit: f93d3c70b1b14665ddc11ca2c39e1d114390e5f9
URL: https://github.com/kamailio/kamailio/commit/f93d3c70b1b14665ddc11ca2c39e1d114390e5f9
Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at 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/f93d3c70b1b14665ddc11ca2c39e1d114390e5f9.diff
Patch: https://github.com/kamailio/kamailio/commit/f93d3c70b1b14665ddc11ca2c39e1d114390e5f9.patch
---
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;
}
}
More information about the sr-dev
mailing list