From 8a1d347b2e129a6085fb605f706917d88aa054b7 Mon Sep 17 00:00:00 2001 From: Derrick Brashear Date: Tue, 10 Jan 2006 15:09:55 +0000 Subject: [PATCH] remove-vnop-mem-leak-20060110 avoid leaking mvid when we use .__afsXXXX renaming in remove --- src/afs/VNOPS/afs_vnop_remove.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/afs/VNOPS/afs_vnop_remove.c b/src/afs/VNOPS/afs_vnop_remove.c index a9de86702c..928e41e66f 100644 --- a/src/afs/VNOPS/afs_vnop_remove.c +++ b/src/afs/VNOPS/afs_vnop_remove.c @@ -393,7 +393,12 @@ afs_remove(OSI_VC_ARG(adp), aname, acred) code = afsrename(adp, aname, adp, unlname, acred, &treq); Tnam1 = unlname; if (!code) { + char *oldmvid = NULL; + if (tvc->mvid) + oldmvid = tvc->mvid; tvc->mvid = (struct VenusFid *)unlname; + if (oldmvid) + osi_FreeSmallSpace(oldmvid); crhold(acred); if (tvc->uncred) { crfree(tvc->uncred);