From d9b0bec989a0ef61b8e88147b618a46e763fb3b7 Mon Sep 17 00:00:00 2001 From: "goprife@gmail.com" Date: Sat, 20 Oct 2012 01:59:41 +0000 Subject: [PATCH] fix bug in dfs_unmount when test unmount condition found by Rob(rdent@iinet.net.au) git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2356 bbd45198-f89e-11dd-88c7-29a3b14d5316 --- components/dfs/src/dfs_fs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/dfs/src/dfs_fs.c b/components/dfs/src/dfs_fs.c index 7d88fac67..7c319722c 100644 --- a/components/dfs/src/dfs_fs.c +++ b/components/dfs/src/dfs_fs.c @@ -361,7 +361,7 @@ int dfs_unmount(const char *specialfile) dfs_lock(); fs = dfs_filesystem_lookup(fullpath); - if (fs != RT_NULL && fs->ops->unmount != RT_NULL && fs->ops->unmount(fs) < 0) + if (fs == RT_NULL || fs->ops->unmount == RT_NULL || fs->ops->unmount(fs) < 0) { goto err1; }