diff options
author | George Kiagiadakis <george.kiagiadakis@collabora.com> | 2021-07-09 13:37:04 +0300 |
---|---|---|
committer | George Kiagiadakis <george.kiagiadakis@collabora.com> | 2021-07-28 13:19:02 +0300 |
commit | 8a8133fe9c4fc1628a101b5ca55375c341b1bfe9 (patch) | |
tree | 7565988b37b472082897fda28aec8e7cc1199a3a /lib/receiver.c | |
parent | 404fcb1c102af07a6760a80fa994d20e9a4de7f7 (diff) |
lib: initialize epoll_event structures
caught by valgrind
Signed-off-by: George Kiagiadakis <george.kiagiadakis@collabora.com>
Diffstat (limited to 'lib/receiver.c')
-rw-r--r-- | lib/receiver.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/receiver.c b/lib/receiver.c index 9c21063..9b34494 100644 --- a/lib/receiver.c +++ b/lib/receiver.c @@ -55,7 +55,7 @@ static void socket_event_received(EpollThread *t, int fd, void *data) { socklen_t addr_size = sizeof(self->addr); int sender_fd = accept4(fd, (struct sockaddr *)&self->addr, &addr_size, SOCK_CLOEXEC | SOCK_NONBLOCK); - struct epoll_event event; + struct epoll_event event = {0}; event.events = EPOLLIN; event.data.fd = sender_fd; epoll_ctl(t->epoll_fd, EPOLL_CTL_ADD, sender_fd, &event); |