diff options
author | phk <phk@FreeBSD.org> | 2002-10-15 18:51:02 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2002-10-15 18:51:02 +0000 |
commit | 9ce3340232ae0c31d3a8917e860e7b1ca951f732 (patch) | |
tree | 27b0aa7bdddc2b7022454b5e421d402053cf159f /sys/fs/pseudofs/pseudofs_vncache.c | |
parent | 10a95012cf1499e70a7935802207d0eb346092f1 (diff) | |
download | FreeBSD-src-9ce3340232ae0c31d3a8917e860e7b1ca951f732.zip FreeBSD-src-9ce3340232ae0c31d3a8917e860e7b1ca951f732.tar.gz |
Plug an infrequent (I think) memory leak.
Spotted by: FlexeLint
Diffstat (limited to 'sys/fs/pseudofs/pseudofs_vncache.c')
-rw-r--r-- | sys/fs/pseudofs/pseudofs_vncache.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/fs/pseudofs/pseudofs_vncache.c b/sys/fs/pseudofs/pseudofs_vncache.c index 59f61af..76fdf3e 100644 --- a/sys/fs/pseudofs/pseudofs_vncache.c +++ b/sys/fs/pseudofs/pseudofs_vncache.c @@ -136,8 +136,10 @@ pfs_vncache_alloc(struct mount *mp, struct vnode **vpp, if (++pfs_vncache_entries > pfs_vncache_maxentries) pfs_vncache_maxentries = pfs_vncache_entries; error = getnewvnode("pseudofs", mp, pfs_vnodeop_p, vpp); - if (error) + if (error) { + FREE(pvd, M_PFSVNCACHE); return (error); + } pvd->pvd_pn = pn; pvd->pvd_pid = pid; (*vpp)->v_data = pvd; |