Skip to content
Snippets Groups Projects
Commit a62b258b authored by Daniel Salzman's avatar Daniel Salzman
Browse files

server: fix possible uninitialized scalar access when early deinitializing iface (Coverity)

parent c90f1a47
No related branches found
No related tags found
No related merge requests found
......@@ -373,8 +373,8 @@ static iface_t *server_init_iface(struct sockaddr_storage *addr, bool quic,
}
#endif
new_if->fd_udp = malloc(udp_socket_count * sizeof(int));
new_if->fd_tcp = malloc(tcp_socket_count * sizeof(int));
new_if->fd_udp = calloc(udp_socket_count, sizeof(int));
new_if->fd_tcp = calloc(tcp_socket_count, sizeof(int));
if (new_if->fd_udp == NULL || new_if->fd_tcp == NULL) {
log_error("failed to initialize interface");
server_deinit_iface(new_if, true);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment