소스 검색

Initialize socket struct to satisfy static code analysis

See #794
bel2125 5 년 전
부모
커밋
3550ccaa12
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      src/civetweb.c

+ 1 - 0
src/civetweb.c

@@ -18908,6 +18908,7 @@ accept_new_connection(const struct socket *listener, struct mg_context *ctx)
 #if !defined(__ZEPHYR__)
 	int on = 1;
 #endif
+	memset(&so, 0, sizeof(so));
 
 	if ((so.sock = accept(listener->sock, &so.rsa.sa, &len))
 	    == INVALID_SOCKET) {