ソースを参照

mi_datagram: init structure before conditions to jump to err label

- garbage condition would have been made in err case
Daniel-Constantin Mierla 10 年 前
コミット
bd189f4239
1 ファイル変更2 行追加2 行削除
  1. 2 2
      modules/mi_datagram/datagram_fnc.c

+ 2 - 2
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*/