diff --git a/lib/sock/posix/posix.c b/lib/sock/posix/posix.c index f711933438..568fc805e5 100644 --- a/lib/sock/posix/posix.c +++ b/lib/sock/posix/posix.c @@ -506,6 +506,7 @@ spdk_posix_sock_group_impl_add_sock(struct spdk_sock_group_impl *_group, struct #if defined(__linux__) struct epoll_event event; + memset(&event, 0, sizeof(event)); event.events = EPOLLIN; event.data.ptr = sock; diff --git a/lib/sock/vpp/vpp.c b/lib/sock/vpp/vpp.c index 5d8e5878ea..d97b5559ce 100644 --- a/lib/sock/vpp/vpp.c +++ b/lib/sock/vpp/vpp.c @@ -557,6 +557,7 @@ spdk_vpp_sock_group_impl_add_sock(struct spdk_sock_group_impl *_group, struct sp assert(group != NULL); assert(g_vpp_initialized); + memset(&event, 0, sizeof(event)); event.events = EPOLLIN; event.data.ptr = sock;