From 9126a7b48e2c27fb0ce19785181286b15a438f76 Mon Sep 17 00:00:00 2001 From: Fabian Vogt Date: Fri, 15 May 2020 20:32:10 +0200 Subject: [PATCH] Avoid closing se->fd twice in fuse_lowlevel.c (#516) If fuse_session_unmount is called before fuse_session_destroy, both would try to close(se->fd). Avoid that by resetting it in fuse_session_unmount. --- lib/fuse_lowlevel.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/fuse_lowlevel.c b/lib/fuse_lowlevel.c index fd1f484..3dabbd5 100644 --- a/lib/fuse_lowlevel.c +++ b/lib/fuse_lowlevel.c @@ -3040,6 +3040,7 @@ void fuse_session_unmount(struct fuse_session *se) { if (se->mountpoint != NULL) { fuse_kern_unmount(se->mountpoint, se->fd); + se->fd = -1; free(se->mountpoint); se->mountpoint = NULL; } -- 2.30.2