_afsconf_OpenInternal() may exit early for a number of reasons
before properly initalizing afsconf_dir->listKeys.
This leads to a crash when _afsconf_CloseInternal() attempts
to clean up listKeys.
Prevent this situation by calling afsconf_InitKeys() before any
possible exit from _afsconf_OpenInternal().
Change-Id: I6911427817a2518a576c00a7ea56351f9fb4fd19
Reviewed-on: http://gerrit.openafs.org/10323
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
cm_enumCellRegistry_t enumCellRegistry = {0, 0};
#endif /* AFS_NT40_ENV */
+ /* init the keys queue before any call to afsconf_CloseInternal() */
+ _afsconf_InitKeys(adir);
+
/* figure out the local cell name */
#ifdef AFS_NT40_ENV
i = GetCellNT(adir);
return -1;
}
- /* init the keys queue before any call to afsconf_CloseInternal() */
- _afsconf_InitKeys(adir);
-
/* The CellServDB file is now open.
* The following code parses the contents of the
* file and creates a list with the first cell entry