afs: Avoid panics on failed return from afs_CFileOpen
[openafs.git] / src / afs / afs_init.c
index f2414f7..5d72319 100644 (file)
@@ -334,7 +334,9 @@ afs_InitVolumeInfo(char *afile)
     if (code)
        return code;
     tfile = afs_CFileOpen(&volumeInode);
-    osi_Assert(tfile);
+    if (!tfile) {
+       return EIO;
+    }
     afs_CFileTruncate(tfile, 0);
     afs_CFileClose(tfile);
     return 0;