Browse Source

cdp: init the entire msg structure

Daniel-Constantin Mierla 3 năm trước cách đây
mục cha
commit
782b477311
1 tập tin đã thay đổi với 1 bổ sung0 xóa
  1. 1 0
      src/modules/cdp/receiver.c

+ 1 - 0
src/modules/cdp/receiver.c

@@ -346,6 +346,7 @@ static int receive_fd(int pipe_fd, int* fd,peer **p)
 		char control[CMSG_SPACE(sizeof(new_fd))];
 		char control[CMSG_SPACE(sizeof(new_fd))];
 	}control_un;
 	}control_un;
 
 
+	memset(&msg, 0, sizeof(struct msghdr));
 	msg.msg_control=control_un.control;
 	msg.msg_control=control_un.control;
 	msg.msg_controllen=sizeof(control_un.control);
 	msg.msg_controllen=sizeof(control_un.control);
 #else
 #else