From: Nickolai Zeldovich Date: Sun, 24 Mar 2002 19:08:45 +0000 (+0000) Subject: Initialize tvc in afs_remove so that we don't call afs_PutVCache X-Git-Tag: openafs-devel_1_3_3~175 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=0329c5fbb42d14da20acb97ebda48b9974220b0e;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. --- diff --git a/src/afs/VNOPS/afs_vnop_remove.c b/src/afs/VNOPS/afs_vnop_remove.c index 8886da3d6..f946b3d66 100644 --- a/src/afs/VNOPS/afs_vnop_remove.c +++ b/src/afs/VNOPS/afs_vnop_remove.c @@ -237,6 +237,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