From: Fabian Vogt Date: Fri, 15 May 2020 18:32:10 +0000 (+0200) Subject: Avoid closing se->fd twice in fuse_lowlevel.c (#516) X-Git-Tag: fuse-3.9.2~2 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=9126a7b48e2c27fb0ce19785181286b15a438f76;p=qemu-gpiodev%2Flibfuse.git 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. --- 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; }