Index: sys/rump/librump/rumpvfs/rumpfs.c =================================================================== RCS file: /cvsroot/src/sys/rump/librump/rumpvfs/rumpfs.c,v retrieving revision 1.130 diff -p -u -r1.130 rumpfs.c --- sys/rump/librump/rumpvfs/rumpfs.c 17 Aug 2014 19:28:46 -0000 1.130 +++ sys/rump/librump/rumpvfs/rumpfs.c 18 Aug 2014 04:34:46 -0000 @@ -792,6 +792,10 @@ rump_vop_lookup(void *v) } else { mutex_exit(&reclock); rv = makevnode(dvp->v_mount, rn, vpp); + /* + * XXX If makevnode fails, and rnd had RUMPNODE_DIR_ET + * set, who frees rn? + */ } return rv; @@ -992,8 +996,10 @@ rump_vop_mkdir(void *v) rn->rn_va.va_flags |= UF_OPAQUE; rn->rn_parent = rnd; rv = makevnode(dvp->v_mount, rn, vpp); - if (rv) + if (rv) { + kmem_free(rn, sizeof(*rn)); return rv; + } makedir(rnd, cnp, rn); @@ -1088,8 +1094,10 @@ rump_vop_mknod(void *v) if ((cnp->cn_flags & ISWHITEOUT) != 0) rn->rn_va.va_flags |= UF_OPAQUE; rv = makevnode(dvp->v_mount, rn, vpp); - if (rv) + if (rv) { + kmem_free(rn, sizeof(*rn)); return rv; + } makedir(rnd, cnp, rn); @@ -1119,8 +1127,10 @@ rump_vop_create(void *v) if ((cnp->cn_flags & ISWHITEOUT) != 0) rn->rn_va.va_flags |= UF_OPAQUE; rv = makevnode(dvp->v_mount, rn, vpp); - if (rv) + if (rv) { + kmem_free(rn, sizeof(*rn)); return rv; + } makedir(rnd, cnp, rn); @@ -1152,8 +1162,10 @@ rump_vop_symlink(void *v) if ((cnp->cn_flags & ISWHITEOUT) != 0) rn->rn_va.va_flags |= UF_OPAQUE; rv = makevnode(dvp->v_mount, rn, vpp); - if (rv) + if (rv) { + kmem_free(rn, sizeof(*rn)); return rv; + } makedir(rnd, cnp, rn); @@ -1741,6 +1753,7 @@ rumpfs_mountfs(struct mount *mp) rn = makeprivate(VDIR, RUMPFS_DEFAULTMODE, NODEV, DEV_BSIZE, false); rn->rn_parent = rn; if ((error = makevnode(mp, rn, &rfsmp->rfsmp_rvp)) != 0) { + kmem_free(rn, sizeof(*rn)); kmem_free(rfsmp, sizeof(*rfsmp)); return error; }