Add back a fdrop() call at the end of kern_open() that got lost in

revision 1.218. This bug caused a "struct file" reference to be
leaked if VOP_ADVLOCK(), vn_start_write(), or mac_check_vnode_write()
failed during the open operation.

PR:		kern/43739
Reported by:	Arne Woerner <woerner@mediabase-gmbh.de>
This commit is contained in:
Ian Dowse 2002-10-07 20:49:22 +00:00
parent f96d19da13
commit 197b023b1b
2 changed files with 2 additions and 0 deletions

View file

@ -773,6 +773,7 @@ bad:
fdrop(fp, td);
} else
FILEDESC_UNLOCK(fdp);
fdrop(fp, td);
return (error);
}

View file

@ -773,6 +773,7 @@ bad:
fdrop(fp, td);
} else
FILEDESC_UNLOCK(fdp);
fdrop(fp, td);
return (error);
}