lib/mount_bsd.c: Close device before unmount.
authorCsaba Henk <csaba.henk@creo.hu>
Thu, 3 Jan 2008 12:13:54 +0000 (12:13 +0000)
committerCsaba Henk <csaba.henk@creo.hu>
Thu, 3 Jan 2008 12:13:54 +0000 (12:13 +0000)
Cf. lib/mount.c rev. 1.43.

ChangeLog
lib/mount_bsd.c

index 828837a82ee2b2b15fe3326120142aa1df14b6bc..1ba2a5da5900a324002bb24d87a1d3639f9f6f22 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-01-03  Csaba Henk <csaba.henk@creo.hu>
+
+       * lib/mount_bsd.c: close device before unmount
+       (cf. lib/mount.c rev. 1.43) and fix some warnings 
+
 2007-12-23  Miklos Szeredi <miklos@szeredi.hu>
 
        * Fix './configure --disable-static'.  Patch from Ismail Dönmez
index a1c609dfde1db16bfa6a3f6306dd8d1967c3bdb2..09611c12059a274686e09e1d652ec6d5c715d5cd 100644 (file)
@@ -1,6 +1,6 @@
 /*
   FUSE: Filesystem in Userspace
-  Copyright (C) 2005-2006 Csaba Henk <csaba.henk@creo.hu>
+  Copyright (C) 2005-2008 Csaba Henk <csaba.henk@creo.hu>
 
   This program can be distributed under the terms of the GNU LGPLv2.
   See the file COPYING.LIB.
@@ -206,6 +206,7 @@ void fuse_unmount_compat22(const char *mountpoint)
                return;
 
        asprintf(&umount_cmd, "/sbin/umount %s", dev);
+       close(fd);
        system(umount_cmd);
 }
 
@@ -229,6 +230,7 @@ void fuse_kern_unmount(const char *mountpoint, int fd)
                return;
 
        asprintf(&umount_cmd, "/sbin/umount " _PATH_DEV "%s", dev);
+       close(fd);
        system(umount_cmd);
 }