vol: Blank fake linkHandles
[openafs.git] / src / vol / namei_ops.c
index c493fa5..463b66b 100644 (file)
@@ -1629,14 +1629,14 @@ GetFreeTag(IHandle_t * ih, int vno)
     if (fdP == NULL)
        return -1;
 
+    offset = (vno << LINKTABLE_SHIFT) + 8;     /* * 2 + sizeof stamp */
+
     /* Only one manipulates at a time. */
     if (FDH_LOCKFILE(fdP, offset) != 0) {
        FDH_REALLYCLOSE(fdP);
        return -1;
     }
 
-    offset = (vno << LINKTABLE_SHIFT) + 8;     /* * 2 + sizeof stamp */
-
     nBytes = FDH_PREAD(fdP, (char *)&row, sizeof(row), offset);
     if (nBytes != sizeof(row)) {
        if (nBytes != 0)
@@ -2505,6 +2505,8 @@ namei_ListAFSSubDirs(IHandle_t * dirIH,
     struct rx_queue resultlist;
 #endif
 
+    memset(&linkHandle, 0, sizeof(linkHandle));
+
     namei_HandleToVolDir(&name, &myIH);
     strlcpy(path1, name.n_path, sizeof(path1));
 
@@ -2779,6 +2781,8 @@ DecodeInode(char *dpath, char *name, struct ViceInodeInfo *info,
     char dirl;
     VolumeId volid = myIH->ih_vid;
 
+    memset(&linkHandle, 0, sizeof(linkHandle));
+
     snprintf(fpath, sizeof(fpath), "%s" OS_DIRSEP "%s", dpath, name);
 
     dirH = FindFirstFileEx(fpath, FindExInfoStandard, &data,