aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBernd Schubert <bschubert@ddn.com>2025-08-18 23:22:02 +0200
committerBernd Schubert <bernd@bsbernd.com>2025-08-22 16:57:26 +0200
commit253ea916fd5122e1c182cb3ffbff1ac2eeea3991 (patch)
tree3d62e5a280691b1d494a9078d227a203ee8d71bc /lib
parent210d92f66b128b229c5803d6f430f346d690feb0 (diff)
downloadlibfuse-253ea916fd5122e1c182cb3ffbff1ac2eeea3991.tar.gz
fuse-io-uring: Release io-uring resources on io-uring startup failure
Operation might continue without io-uring, so just free these resources. Signed-off-by: Bernd Schubert <bschubert@ddn.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/fuse_uring.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/fuse_uring.c b/lib/fuse_uring.c
index 53ef8db..104be14 100644
--- a/lib/fuse_uring.c
+++ b/lib/fuse_uring.c
@@ -803,6 +803,11 @@ int fuse_uring_start(struct fuse_session *se)
pthread_mutex_unlock(&fuse_ring->thread_start_mutex);
err:
+ if (err) {
+ /* Note all threads need to have been started */
+ fuse_session_destruct_uring(fuse_ring);
+ se->uring.pool = fuse_ring;
+ }
return err;
}