Blame SOURCES/Initialize-our-epoll_event-structures.patch

d3abf8
From c824b8ef3b5ec630edb0f8be78b64b2431c4482f Mon Sep 17 00:00:00 2001
d3abf8
From: Robbie Harwood <rharwood@redhat.com>
d3abf8
Date: Thu, 30 Jul 2020 16:43:30 -0400
d3abf8
Subject: [PATCH] Initialize our epoll_event structures
d3abf8
d3abf8
Fixes a valgrind error for the other fields of epoll_event.
d3abf8
d3abf8
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
d3abf8
(cherry picked from commit 48bfadc538bca3b9ca478c711af75245163d0b67)
d3abf8
(cherry picked from commit 35579d9de1d3f295fb4548c73fc6a729d04128c6)
d3abf8
---
d3abf8
 src/client/gpm_common.c | 6 ++++++
d3abf8
 1 file changed, 6 insertions(+)
d3abf8
d3abf8
diff --git a/src/client/gpm_common.c b/src/client/gpm_common.c
d3abf8
index 808f350..d932ba2 100644
d3abf8
--- a/src/client/gpm_common.c
d3abf8
+++ b/src/client/gpm_common.c
d3abf8
@@ -195,6 +195,8 @@ static int gpm_epoll_setup(struct gpm_ctx *gpmctx)
d3abf8
     struct epoll_event ev;
d3abf8
     int ret;
d3abf8
 
d3abf8
+    memset(&ev, 0, sizeof(ev));
d3abf8
+
d3abf8
     if (gpmctx->epollfd >= 0) {
d3abf8
         gpm_epoll_close(gpmctx);
d3abf8
     }
d3abf8
@@ -276,6 +278,10 @@ static int gpm_epoll_wait(struct gpm_ctx *gpmctx, uint32_t event_flags)
d3abf8
     struct epoll_event events[2];
d3abf8
     uint64_t timer_read;
d3abf8
 
d3abf8
+    memset(&ev, 0, sizeof(ev));
d3abf8
+    memset(&events[0], 0, sizeof(events[0]));
d3abf8
+    memset(&events[1], 0, sizeof(events[1]));
d3abf8
+
d3abf8
     if (gpmctx->epollfd < 0) {
d3abf8
         ret = gpm_epoll_setup(gpmctx);
d3abf8
         if (ret)