diff options
author | Fabian Vogt <fabian@ritter-vogt.de> | 2020-05-15 20:32:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-15 19:32:10 +0100 |
commit | 9126a7b48e2c27fb0ce19785181286b15a438f76 (patch) | |
tree | 78ebf2a4887298ce42b155f17612896015e7390a /lib | |
parent | ded868455aecc883ecc53b1fac7356dba761b240 (diff) | |
download | libfuse-9126a7b48e2c27fb0ce19785181286b15a438f76.tar.gz |
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.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/fuse_lowlevel.c | 1 |
1 files changed, 1 insertions, 0 deletions
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; } |