Module: kamailio
Branch: master
Commit: bd189f4239403b4b673f3d5b0ce3b6e5c7f4bacc
URL:
https://github.com/kamailio/kamailio/commit/bd189f4239403b4b673f3d5b0ce3b6e…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2015-05-14T12:25:33+02:00
mi_datagram: init structure before conditions to jump to err label
- garbage condition would have been made in err case
---
Modified: modules/mi_datagram/datagram_fnc.c
---
Diff:
https://github.com/kamailio/kamailio/commit/bd189f4239403b4b673f3d5b0ce3b6e…
Patch:
https://github.com/kamailio/kamailio/commit/bd189f4239403b4b673f3d5b0ce3b6e…
---
diff --git a/modules/mi_datagram/datagram_fnc.c b/modules/mi_datagram/datagram_fnc.c
index 8470ddb..0309b73 100644
--- a/modules/mi_datagram/datagram_fnc.c
+++ b/modules/mi_datagram/datagram_fnc.c
@@ -331,9 +331,9 @@ static void datagram_close_async(struct mi_root *mi_rpl,struct
mi_handler *hdl,
LM_DBG("the socket domain is %i and af_local is %i\n", p->domain,
AF_LOCAL);
- mi_create_dtgram_replysocket(reply_sock, p->domain, err);
+ memset(&dtgram, 0, sizeof(dtgram));
- memset(&dtgram, 0, sizeof(dtgram));
+ mi_create_dtgram_replysocket(reply_sock, p->domain, err);
if (mi_rpl!=0) {
/*allocate the response datagram*/