remove-vnop-mem-leak-20060110

avoid leaking mvid when we use .__afsXXXX renaming in remove
This commit is contained in:
Derrick Brashear 2006-01-10 15:09:55 +00:00
parent 39b23a0dc1
commit 8a1d347b2e

View File

@ -393,7 +393,12 @@ afs_remove(OSI_VC_ARG(adp), aname, acred)
code = afsrename(adp, aname, adp, unlname, acred, &treq); code = afsrename(adp, aname, adp, unlname, acred, &treq);
Tnam1 = unlname; Tnam1 = unlname;
if (!code) { if (!code) {
char *oldmvid = NULL;
if (tvc->mvid)
oldmvid = tvc->mvid;
tvc->mvid = (struct VenusFid *)unlname; tvc->mvid = (struct VenusFid *)unlname;
if (oldmvid)
osi_FreeSmallSpace(oldmvid);
crhold(acred); crhold(acred);
if (tvc->uncred) { if (tvc->uncred) {
crfree(tvc->uncred); crfree(tvc->uncred);