[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] cluster/gfs2/mount mount.gfs2.c



CVSROOT:	/cvs/cluster
Module name:	cluster
Changes by:	rpeterso sourceware org	2007-05-14 19:01:02

Modified files:
	gfs2/mount     : mount.gfs2.c 

Log message:
	Close the /sys/fs directory after using it.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/mount/mount.gfs2.c.diff?cvsroot=cluster&r1=1.22&r2=1.23

--- cluster/gfs2/mount/mount.gfs2.c	2007/04/26 18:45:37	1.22
+++ cluster/gfs2/mount/mount.gfs2.c	2007/05/14 19:01:01	1.23
@@ -162,9 +162,12 @@
 	while ((de = readdir(d))) {
 		if (strnlen(fsname, 5) != strnlen(de->d_name, 5))
 			continue;
-		if (!strncmp(fsname, de->d_name, strnlen(fsname, 5)))
+		if (!strncmp(fsname, de->d_name, strnlen(fsname, 5))) {
+			closedir(d);
 			return;
+		}
 	}
+	closedir(d);
 	die("fs type \"%s\" not found in /sys/fs/, is the module loaded?\n",
 	    fsname);
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]