summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/waiter/waiter.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/waiter/waiter.c b/lib/waiter/waiter.c
index 21dd4a5..214dfda 100644
--- a/lib/waiter/waiter.c
+++ b/lib/waiter/waiter.c
@@ -54,9 +54,10 @@ int waiter_poll(void)
static int n_pollfds;
int i, rc;
- if (n_waiters > n_pollfds) {
+ if (n_waiters != n_pollfds) {
pollfds = talloc_realloc(NULL, pollfds,
struct pollfd, n_waiters);
+ n_pollfds = n_waiters;
}
for (i = 0; i < n_waiters; i++) {
OpenPOWER on IntegriCloud