Add the missing assignment of the global n_pollfds variable.
Fix a minor memory leak in waiter_poll().
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
static int n_pollfds;
int i, rc;
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);
pollfds = talloc_realloc(NULL, pollfds,
struct pollfd, n_waiters);
}
for (i = 0; i < n_waiters; i++) {
}
for (i = 0; i < n_waiters; i++) {