[sr-dev] git:master:998e8c15: modules/ims_qos: zero-initialise strcuture variables

jaybeepee jason.penton at gmail.com
Fri Sep 9 14:34:36 CEST 2016


Module: kamailio
Branch: master
Commit: 998e8c1524d25f11626290f28444b614a25eedd5
URL: https://github.com/kamailio/kamailio/commit/998e8c1524d25f11626290f28444b614a25eedd5

Author: jaybeepee <jason.penton at gmail.com>
Committer: jaybeepee <jason.penton at gmail.com>
Date: 2016-09-09T14:34:23+02:00

modules/ims_qos: zero-initialise strcuture variables

---

Modified: modules/ims_qos/mod.c
Modified: modules/ims_qos/rx_aar.c

---

Diff:  https://github.com/kamailio/kamailio/commit/998e8c1524d25f11626290f28444b614a25eedd5.diff
Patch: https://github.com/kamailio/kamailio/commit/998e8c1524d25f11626290f28444b614a25eedd5.patch

---

diff --git a/modules/ims_qos/mod.c b/modules/ims_qos/mod.c
index 91566c8..c103b14 100644
--- a/modules/ims_qos/mod.c
+++ b/modules/ims_qos/mod.c
@@ -1279,6 +1279,7 @@ static int w_rx_aar_register(struct sip_msg *msg, char* route, char* str1, char*
 				if (h->type == HDR_CONTACT_T && h->parsed) {
 						for (c = ((contact_body_t*) h->parsed)->contacts; c; c = c->next) {
 								ul.lock_udomain(domain_t, &vb->host, vb->port, vb->proto);
+								memset(&contact_info, 0, sizeof(struct pcontact_info));
 								contact_info.aor = c->uri;
 								contact_info.via_host = vb->host;
 								contact_info.via_port = vb->port;
diff --git a/modules/ims_qos/rx_aar.c b/modules/ims_qos/rx_aar.c
index 95d1934..45d90ee 100644
--- a/modules/ims_qos/rx_aar.c
+++ b/modules/ims_qos/rx_aar.c
@@ -308,7 +308,7 @@ void async_aar_reg_callback(int is_timeout, void *param, AAAMessage *aaa, long e
         LM_DBG("Registering for Usrloc callbacks on DELETE\n");
 
         ul.lock_udomain(domain_t, &local_data->via_host, local_data->via_port, local_data->via_proto);
-
+		memset(&contact_info, 0, sizeof(struct pcontact_info));
         contact_info.received_host = local_data->recv_host;
         contact_info.received_port = local_data->recv_port;
         contact_info.received_proto = local_data->recv_proto;




More information about the sr-dev mailing list