diff options
author | jh <jh@FreeBSD.org> | 2010-08-19 16:39:00 +0000 |
---|---|---|
committer | jh <jh@FreeBSD.org> | 2010-08-19 16:39:00 +0000 |
commit | 61e0ffd17126aa793382d8f10f2b1f0004ae47c2 (patch) | |
tree | 9b608a615c49574380e3d9cdac24cad3492aeda6 | |
parent | faa167a723503cbb19f7eb519157d5c4cbb37e3b (diff) | |
download | FreeBSD-src-61e0ffd17126aa793382d8f10f2b1f0004ae47c2.zip FreeBSD-src-61e0ffd17126aa793382d8f10f2b1f0004ae47c2.tar.gz |
Call dev_rel() in error paths.
Reported by: kib
Reviewed by: kib
MFC after: 2 weeks
-rw-r--r-- | sys/fs/devfs/devfs_vnops.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/fs/devfs/devfs_vnops.c b/sys/fs/devfs/devfs_vnops.c index 542ecae..0bcc093 100644 --- a/sys/fs/devfs/devfs_vnops.c +++ b/sys/fs/devfs/devfs_vnops.c @@ -848,6 +848,8 @@ devfs_lookupx(struct vop_lookup_args *ap, int *dm_unlock) *dm_unlock = 0; sx_xunlock(&dmp->dm_lock); devfs_unmount_final(dmp); + if (cdev != NULL) + dev_rel(cdev); return (ENOENT); } if (cdev == NULL) @@ -859,6 +861,7 @@ devfs_lookupx(struct vop_lookup_args *ap, int *dm_unlock) *dm_unlock = 0; sx_xunlock(&dmp->dm_lock); devfs_unmount_final(dmp); + dev_rel(cdev); return (ENOENT); } |