imsm spares do not have container membership by default so we associate
them with the first container found in the configuration file. Some
ARRAY lines do not specify the metadata type so we cannot assume that
_cst will always be valid.
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
struct supertype *_cst; /* container supertype */
_cst = array_list->st;
struct supertype *_cst; /* container supertype */
_cst = array_list->st;
- _sst = _cst->ss->match_metadata_desc(inf->text_version);
+ if (_cst)
+ _sst = _cst->ss->match_metadata_desc(inf->text_version);
+ else
+ _sst = NULL;
+
if (_sst) {
memcpy(inf->uuid, array_list->uuid, sizeof(int[4]));
free(_sst);
if (_sst) {
memcpy(inf->uuid, array_list->uuid, sizeof(int[4]));
free(_sst);