summaryrefslogtreecommitdiffstats
path: root/src/ioq.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2024-02-15 12:43:27 -0500
committerTavian Barnes <tavianator@tavianator.com>2024-02-15 12:43:27 -0500
commit08e23800dcccc0bc302dabc18ba5f5b8f78c846d (patch)
treed84e6b92261ac5b82cc97fb0a013eb20703d0e6f /src/ioq.c
parentb3cdf12d71798a26c1f6d46dceff7ed50b9eed83 (diff)
downloadbfs-08e23800dcccc0bc302dabc18ba5f5b8f78c846d.tar.xz
ioq: Add a missing close() if bfs_opendir() fails
Diffstat (limited to 'src/ioq.c')
-rw-r--r--src/ioq.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/ioq.c b/src/ioq.c
index 0936adf..2558d62 100644
--- a/src/ioq.c
+++ b/src/ioq.c
@@ -623,6 +623,8 @@ static void ioq_reap_cqe(struct ioq_ring_state *state, struct io_uring_cqe *cqe)
if (ent->result >= 0) {
// TODO: io_uring_prep_getdents()
bfs_polldir(args->dir);
+ } else {
+ xclose(fd);
}
break;