diff options
author | Neil Brown <neilb@suse.de> | 2007-12-14 10:14:00 +0100 |
---|---|---|
committer | Neil Brown <neilb@suse.de> | 2007-12-14 10:14:00 +0100 |
commit | df37ffc0393b919ba5607bb48b2eaf2f9a1832d7 (patch) | |
tree | da5119c602aa6e1c40248b5a9c8312aedceaeedb /Detail.c | |
parent | Make sure sysfs_read never succeeds for a non-MD device. (diff) | |
download | mdadm-df37ffc0393b919ba5607bb48b2eaf2f9a1832d7.tar.xz mdadm-df37ffc0393b919ba5607bb48b2eaf2f9a1832d7.zip |
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.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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"); |