From 353919948a35a4d7ae9cc453d538e26847e37d3a Mon Sep 17 00:00:00 2001 From: Demi Marie Obenour Date: Sat, 27 Aug 2022 17:56:58 -0400 Subject: [PATCH] Ensure that *reply is set to NULL on error This ensures it is not left uninitialized. Signed-off-by: Demi Marie Obenour --- src/xcb_in.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xcb_in.c b/src/xcb_in.c index fcbd068..541fb45 100644 --- a/src/xcb_in.c +++ b/src/xcb_in.c @@ -416,6 +416,7 @@ static int poll_for_reply(xcb_connection_t *c, uint64_t request, void **reply, x { struct reply_list *head; + *reply = NULL; /* If an error occurred when issuing the request, fail immediately. */ if(!request) head = 0; @@ -447,7 +448,6 @@ static int poll_for_reply(xcb_connection_t *c, uint64_t request, void **reply, x if(error) *error = 0; - *reply = 0; if(head) {