From: Nickolai Zeldovich Date: Sun, 21 Apr 2002 21:58:18 +0000 (+0000) Subject: Initialize tvc in afs_remove so that we don't call afs_PutVCache X-Git-Tag: openafs-stable-1_2_4~36 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=6d96f1dded607c71e3ac3747095d2529680b774c;p=packages%2Fo%2Fopenafs.git Initialize tvc in afs_remove so that we don't call afs_PutVCache on stack garbage in case of some failure. (cherry picked from commit 0329c5fbb42d14da20acb97ebda48b9974220b0e) --- diff --git a/src/afs/VNOPS/afs_vnop_remove.c b/src/afs/VNOPS/afs_vnop_remove.c index 93fd43c85..ad65b6c0f 100644 --- a/src/afs/VNOPS/afs_vnop_remove.c +++ b/src/afs/VNOPS/afs_vnop_remove.c @@ -233,6 +233,10 @@ afs_remove(OSI_VC_ARG(adp), aname, acred) afs_Trace2(afs_iclSetp, CM_TRACE_REMOVE, ICL_TYPE_POINTER, adp, ICL_TYPE_STRING, aname); +#ifdef AFS_OSF_ENV + tvc = (struct vcache *)ndp->ni_vp; /* should never be null */ +#endif + /* Check if this is dynroot */ if (afs_IsDynroot(adp)) { #ifdef AFS_OSF_ENV