summaryrefslogtreecommitdiffstats
path: root/fuse/mount_bsd.c
diff options
context:
space:
mode:
authorMatt Mower <mowerm@gmail.com>2015-12-13 18:31:00 +0100
committerEthan Yonker <dees_troy@teamw.in>2015-12-23 16:58:04 +0100
commit523a059fb7d5844ebcca279b2f83aff9164b444c (patch)
tree4353fa9fa64a17ef2c5548f0c9f73f5e5f389f6a /fuse/mount_bsd.c
parentexfat: Update to 1.2.2 (diff)
downloadandroid_bootable_recovery-523a059fb7d5844ebcca279b2f83aff9164b444c.tar
android_bootable_recovery-523a059fb7d5844ebcca279b2f83aff9164b444c.tar.gz
android_bootable_recovery-523a059fb7d5844ebcca279b2f83aff9164b444c.tar.bz2
android_bootable_recovery-523a059fb7d5844ebcca279b2f83aff9164b444c.tar.lz
android_bootable_recovery-523a059fb7d5844ebcca279b2f83aff9164b444c.tar.xz
android_bootable_recovery-523a059fb7d5844ebcca279b2f83aff9164b444c.tar.zst
android_bootable_recovery-523a059fb7d5844ebcca279b2f83aff9164b444c.zip
Diffstat (limited to 'fuse/mount_bsd.c')
-rw-r--r--fuse/mount_bsd.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/fuse/mount_bsd.c b/fuse/mount_bsd.c
index 62443ac25..3aec3e3eb 100644
--- a/fuse/mount_bsd.c
+++ b/fuse/mount_bsd.c
@@ -228,18 +228,21 @@ void fuse_kern_unmount(const char *mountpoint, int fd)
(void)mountpoint;
if (fstat(fd, &sbuf) == -1)
- return;
+ goto out;
devname_r(sbuf.st_rdev, S_IFCHR, dev, 128);
if (strncmp(dev, "fuse", 4))
- return;
+ goto out;
strtol(dev + 4, &ep, 10);
if (*ep != '\0')
- return;
+ goto out;
do_unmount(dev, fd);
+
+out:
+ close(fd);
}
/* Check if kernel is doing init in background */