]> git.baikalelectronics.ru Git - kernel.git/commit
staging: vboxsf: fix dereference of pointer dentry before it is null checked
authorColin Ian King <colin.king@canonical.com>
Tue, 5 Nov 2019 17:51:08 +0000 (17:51 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 7 Nov 2019 15:29:17 +0000 (16:29 +0100)
commit7fae95a34ded6cfa8e4330a5ca58e2cdd09bc35d
tree256850638a0729067d6f2f167322c044545b42d1
parente0834dbd07e3f95542737598c93d712c95b4cebd
staging: vboxsf: fix dereference of pointer dentry before it is null checked

Currently the pointer dentry is being dereferenced before it is
being null checked.  Fix this by only dereferencing dentry once
we know it is not null.

Addresses-Coverity: ("Dereference before null check")
Fixes: 919e29678792 ("staging: Add VirtualBox guest shared folder (vboxsf) support")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20191105175108.79824-1-colin.king@canonical.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vboxsf/utils.c