Module: kamailio
Branch: master
Commit: 1611766a329aa60a690803d7ff179159a4657a56
URL:
https://github.com/kamailio/kamailio/commit/1611766a329aa60a690803d7ff17915…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2020-03-26T11:28:51+01:00
core: receive_msg() - init local variables for better runtime troubleshooting
---
Modified: src/core/receive.c
---
Diff:
https://github.com/kamailio/kamailio/commit/1611766a329aa60a690803d7ff17915…
Patch:
https://github.com/kamailio/kamailio/commit/1611766a329aa60a690803d7ff17915…
---
diff --git a/src/core/receive.c b/src/core/receive.c
index b780440030..428214df68 100644
--- a/src/core/receive.c
+++ b/src/core/receive.c
@@ -223,15 +223,15 @@ int ksr_evrt_received(char *buf, unsigned int len, receive_info_t
*rcv_info)
*/
int receive_msg(char *buf, unsigned int len, receive_info_t *rcv_info)
{
- struct sip_msg *msg;
+ struct sip_msg *msg = NULL;
struct run_act_ctx ctx;
- struct run_act_ctx *bctx;
- int ret;
+ struct run_act_ctx *bctx = NULL;
+ int ret = -1;
struct timeval tvb, tve;
struct timezone tz;
unsigned int diff = 0;
- str inb;
- sr_net_info_t netinfo;
+ str inb = STR_NULL;
+ sr_net_info_t netinfo = {0};
sr_kemi_eng_t *keng = NULL;
sr_event_param_t evp = {0};
unsigned int cidlockidx = 0;