summaryrefslogtreecommitdiff
path: root/Detail.c
diff options
context:
space:
mode:
authorNeil Brown <neilb@suse.de>2007-12-14 20:14:00 +1100
committerNeil Brown <neilb@suse.de>2007-12-14 20:14:00 +1100
commitdf37ffc0393b919ba5607bb48b2eaf2f9a1832d7 (patch)
treeda5119c602aa6e1c40248b5a9c8312aedceaeedb /Detail.c
parent2faf1f5f635419a922cf0072c435a23a78b793a7 (diff)
Allow metadata handlers to free their own superblock.
As the metadata handler allocates the superblock, it should free it too. DDF will have a more complex 'superblock' which needs more complex freeing.
Diffstat (limited to 'Detail.c')
-rw-r--r--Detail.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Detail.c b/Detail.c
index 22f0e5c0..a5796038 100644
--- a/Detail.c
+++ b/Detail.c
@@ -119,7 +119,7 @@ int Detail(char *dev, int brief, int export, int test, char *homehost)
st->ss->getinfo_super(&info, super);
if (info.array.ctime != array.ctime ||
info.array.level != array.level) {
- free(super);
+ st->ss->free_super(super);
super = NULL;
}
}
@@ -378,6 +378,8 @@ This is pretty boring
if (spares && brief) printf(" spares=%d", spares);
if (super && brief && st)
st->ss->brief_detail_super(super);
+ if (super)
+ st->ss->free_super(super);
if (brief > 1 && devices) printf("\n devices=%s", devices);
if (brief) printf("\n");