]> git.ipfire.org Git - thirdparty/mdadm.git/commit
fix examine_brief segfault
authorDan Williams <dan.j.williams@intel.com>
Sat, 1 Aug 2009 00:11:41 +0000 (17:11 -0700)
committerDan Williams <dan.j.williams@intel.com>
Sat, 1 Aug 2009 00:11:41 +0000 (17:11 -0700)
commit37424f132cb3874fe51021b1b5e04445a3ba1bdb
tree688e5aa4ce74fb01d4db529c3de46ca8fd9e1ede
parentf98d41ddb4ac543176f33454ceb70983109272d9
fix examine_brief segfault

When performing an "-Ebs -e <metadata type>" we segfault because the
superblock has been freed too early.  We also leak memory for 'ddf' and
'imsm' because, unlike super[01], we do not implicitly free when
->load_super is called on an already loaded supertype.

So, fix up imsm and ddf to match type 0 and 1 ->load_super() semantics,
and update Examine to not free the superblock until all usages have been
exhausted.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Examine.c
super-ddf.c
super-intel.c