mirror of
https://github.com/opnsense/src.git
synced 2026-06-10 09:11:07 -04:00
Do not dereference dvp pointer before doing a NULL check.
Noticed by: Coverity Prevent analysis tool.
This commit is contained in:
parent
59195c3a3d
commit
42e1d99cc8
1 changed files with 2 additions and 1 deletions
|
|
@ -177,7 +177,7 @@ ncp_lookup(struct vnode *dvp, int len, char *name, struct nw_entry_info *fap,
|
|||
struct thread *td,struct ucred *cred)
|
||||
{
|
||||
struct nwmount *nmp;
|
||||
struct nwnode *dnp = VTONW(dvp);
|
||||
struct nwnode *dnp;
|
||||
struct ncp_conn *conn;
|
||||
int error;
|
||||
|
||||
|
|
@ -185,6 +185,7 @@ ncp_lookup(struct vnode *dvp, int len, char *name, struct nw_entry_info *fap,
|
|||
nwfs_printf("dvp is NULL or not a directory.\n");
|
||||
return (ENOENT);
|
||||
}
|
||||
dnp = VTONW(dvp);
|
||||
nmp = VTONWFS(dvp);
|
||||
conn = NWFSTOCONN(nmp);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue