mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 01:30:30 -04:00
Don't try to obtain a reference to a nonexisting (NULL) mount structure in
default VOP_GETWRITEMOUNT().
This commit is contained in:
parent
6508a1ecdc
commit
60b0b1aa18
1 changed files with 6 additions and 4 deletions
|
|
@ -353,10 +353,12 @@ vop_stdgetwritemount(ap)
|
|||
* harmful to return with a ref to our previous mountpoint.
|
||||
*/
|
||||
mp = ap->a_vp->v_mount;
|
||||
vfs_ref(mp);
|
||||
if (mp != ap->a_vp->v_mount) {
|
||||
vfs_rel(mp);
|
||||
mp = NULL;
|
||||
if (mp != NULL) {
|
||||
vfs_ref(mp);
|
||||
if (mp != ap->a_vp->v_mount) {
|
||||
vfs_rel(mp);
|
||||
mp = NULL;
|
||||
}
|
||||
}
|
||||
*(ap->a_mpp) = mp;
|
||||
return (0);
|
||||
|
|
|
|||
Loading…
Reference in a new issue