From 40604d846e25ed4878ef84887aa4556bc1c00cb1 Mon Sep 17 00:00:00 2001 From: claudio Date: Tue, 24 May 2022 09:22:45 +0000 Subject: [PATCH] While not strictly required clear all pfds in the poll loop and not just once at the start. OK tb@ --- usr.sbin/rpki-client/http.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/usr.sbin/rpki-client/http.c b/usr.sbin/rpki-client/http.c index fa230e86d3e..f5339afcb36 100644 --- a/usr.sbin/rpki-client/http.c +++ b/usr.sbin/rpki-client/http.c @@ -1,4 +1,4 @@ -/* $OpenBSD: http.c,v 1.61 2022/05/24 09:20:49 claudio Exp $ */ +/* $OpenBSD: http.c,v 1.62 2022/05/24 09:22:45 claudio Exp $ */ /* * Copyright (c) 2020 Nils Fisher * Copyright (c) 2020 Claudio Jeker @@ -1792,8 +1792,6 @@ proc_http(char *bind_addr, int fd) if (pledge("stdio inet dns recvfd", NULL) == -1) err(1, "pledge"); - memset(&pfds, 0, sizeof(pfds)); - msgbuf_init(&msgq); msgq.fd = fd; @@ -1802,6 +1800,7 @@ proc_http(char *bind_addr, int fd) int timeout; size_t i; + memset(&pfds, 0, sizeof(pfds)); pfds[0].fd = fd; pfds[0].events = POLLIN; if (msgq.queued) -- 2.20.1