diff options
author | tegge <tegge@FreeBSD.org> | 2006-05-05 19:32:35 +0000 |
---|---|---|
committer | tegge <tegge@FreeBSD.org> | 2006-05-05 19:32:35 +0000 |
commit | 65c476a3fd46408c8280da6a36c7b327907ebfba (patch) | |
tree | 7f5a0f6fed99e8a8b5a77bebec869758f4b69a2d | |
parent | 58dbe8e93eb463483697529607346aeff4ce31b5 (diff) | |
download | FreeBSD-src-65c476a3fd46408c8280da6a36c7b327907ebfba.zip FreeBSD-src-65c476a3fd46408c8280da6a36c7b327907ebfba.tar.gz |
Avoid dereferencing NULL pointer.
-rw-r--r-- | sys/sys/mount.h | 4 |
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 \ |