Browse code

core: receive_msg() - init local variables for better runtime troubleshooting

Daniel-Constantin Mierla authored on 26/03/2020 10:28:51
Showing 1 changed files
... ...
@@ -223,15 +223,15 @@ int ksr_evrt_received(char *buf, unsigned int len, receive_info_t *rcv_info)
223 223
  */
224 224
 int receive_msg(char *buf, unsigned int len, receive_info_t *rcv_info)
225 225
 {
226
-	struct sip_msg *msg;
226
+	struct sip_msg *msg = NULL;
227 227
 	struct run_act_ctx ctx;
228
-	struct run_act_ctx *bctx;
229
-	int ret;
228
+	struct run_act_ctx *bctx = NULL;
229
+	int ret = -1;
230 230
 	struct timeval tvb, tve;
231 231
 	struct timezone tz;
232 232
 	unsigned int diff = 0;
233
-	str inb;
234
-	sr_net_info_t netinfo;
233
+	str inb = STR_NULL;
234
+	sr_net_info_t netinfo = {0};
235 235
 	sr_kemi_eng_t *keng = NULL;
236 236
 	sr_event_param_t evp = {0};
237 237
 	unsigned int cidlockidx = 0;