summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortegge <tegge@FreeBSD.org>2006-05-05 19:32:35 +0000
committertegge <tegge@FreeBSD.org>2006-05-05 19:32:35 +0000
commit65c476a3fd46408c8280da6a36c7b327907ebfba (patch)
tree7f5a0f6fed99e8a8b5a77bebec869758f4b69a2d
parent58dbe8e93eb463483697529607346aeff4ce31b5 (diff)
downloadFreeBSD-src-65c476a3fd46408c8280da6a36c7b327907ebfba.zip
FreeBSD-src-65c476a3fd46408c8280da6a36c7b327907ebfba.tar.gz
Avoid dereferencing NULL pointer.
-rw-r--r--sys/sys/mount.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/sys/mount.h b/sys/sys/mount.h
index f63361c..0bf0701 100644
--- a/sys/sys/mount.h
+++ b/sys/sys/mount.h
@@ -576,7 +576,9 @@ extern int mpsafe_vfs;
#define VFS_LOCK_GIANT(MP) __extension__ \
({ \
int _locked; \
- if (VFS_NEEDSGIANT((MP))) { \
+ struct mount *_MP; \
+ _MP = (MP); \
+ if (VFS_NEEDSGIANT(_MP)) { \
mtx_lock(&Giant); \
_locked = 1; \
} else \
OpenPOWER on IntegriCloud