imsm: fix missing initializations of the per-disk extents pointer

Fixes a glibc assertion when trying to free a pointer that was not
malloc'd.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
This commit is contained in:
Dan Williams 2009-02-23 23:06:24 -07:00
parent ddaf4ce2da
commit 689c9bf3c3
1 changed files with 2 additions and 0 deletions

View File

@ -1894,6 +1894,7 @@ static int find_missing(struct intel_super *super)
dl->index = i;
serialcpy(dl->serial, disk->serial);
dl->disk = *disk;
dl->e = NULL;
dl->next = super->missing;
super->missing = dl;
}
@ -2388,6 +2389,7 @@ static int add_to_super_imsm(struct supertype *st, mdu_disk_info_t *dk,
dd->index = -1;
dd->devname = devname ? strdup(devname) : NULL;
dd->fd = fd;
dd->e = NULL;
rv = imsm_read_serial(fd, devname, dd->serial);
if (rv) {
fprintf(stderr,