mirror of
https://git.openafs.org/openafs.git
synced 2025-01-22 08:50:17 +00:00
Verify that afs_GetCellByIndex() returns a valid cell -- it might
be NULL if afs_NewCell() aborted partway through, which could be the case of the CellServDB file has a typo.
This commit is contained in:
parent
77efb238b1
commit
9d8ad37ced
@ -299,12 +299,13 @@ afs_RefreshDynroot()
|
||||
|
||||
for (cellidx = 0; cellidx < maxcellidx; cellidx++) {
|
||||
c = afs_GetCellByIndex(cellidx, READ_LOCK, 0 /* don't refresh */);
|
||||
afs_dynroot_addDirEnt(dirHeader, &curPage, &curChunk,
|
||||
c->cellName, VNUM_FROM_CIDX_RW(cellidx, 0));
|
||||
if (!c) continue;
|
||||
|
||||
dotCell = afs_osi_Alloc(strlen(c->cellName) + 2);
|
||||
strcpy(dotCell, ".");
|
||||
strcat(dotCell, c->cellName);
|
||||
afs_dynroot_addDirEnt(dirHeader, &curPage, &curChunk,
|
||||
c->cellName, VNUM_FROM_CIDX_RW(cellidx, 0));
|
||||
afs_dynroot_addDirEnt(dirHeader, &curPage, &curChunk,
|
||||
dotCell, VNUM_FROM_CIDX_RW(cellidx, 1));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user