Browse Source

cdp: init the entire msg structure

Daniel-Constantin Mierla 3 years ago
parent
commit
782b477311
1 changed files with 1 additions and 0 deletions
  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))];
 	}control_un;
 
+	memset(&msg, 0, sizeof(struct msghdr));
 	msg.msg_control=control_un.control;
 	msg.msg_controllen=sizeof(control_un.control);
 #else