summaryrefslogtreecommitdiffstats
path: root/src/bftw.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2023-06-26 11:47:41 -0400
committerTavian Barnes <tavianator@tavianator.com>2023-06-26 11:47:41 -0400
commitabd29143d805fa16c65489d5b1d79428943d0187 (patch)
treee3f87d3dd0310686a1ed18cb8e1452ba460ab1a6 /src/bftw.c
parent6b96d7b0ad73e6ed63cf5e32fd2544121e2b0284 (diff)
downloadbfs-abd29143d805fa16c65489d5b1d79428943d0187.tar.xz
ioq: New ioq_cancel() function
Diffstat (limited to 'src/bftw.c')
-rw-r--r--src/bftw.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/bftw.c b/src/bftw.c
index 69e41a2..2bdf12d 100644
--- a/src/bftw.c
+++ b/src/bftw.c
@@ -1147,6 +1147,10 @@ static int bftw_gc(struct bftw_state *state, enum bftw_gc_flags flags) {
static int bftw_state_destroy(struct bftw_state *state) {
dstrfree(state->path);
+ if (state->ioq) {
+ ioq_cancel(state->ioq);
+ }
+
SLIST_EXTEND(&state->files, &state->batch);
do {
bftw_gc(state, BFTW_VISIT_NONE);