From df37ffc0393b919ba5607bb48b2eaf2f9a1832d7 Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Fri, 14 Dec 2007 20:14:00 +1100 Subject: 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. --- Examine.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Examine.c') diff --git a/Examine.c b/Examine.c index ba00270..b4dc963 100644 --- a/Examine.c +++ b/Examine.c @@ -119,7 +119,7 @@ int Examine(mddev_dev_t devlist, int brief, int scan, st->ss->getinfo_super(&ap->info, super); } else { st->ss->getinfo_super(&ap->info, super); - free(super); + st->ss->free_super(super); } if (!(ap->info.disk.state & MD_DISK_SYNC)) ap->spares++; @@ -128,7 +128,7 @@ int Examine(mddev_dev_t devlist, int brief, int scan, } else { printf("%s:\n",devlist->devname); st->ss->examine_super(super, homehost); - free(super); + st->ss->free_super(super); } } if (brief) { @@ -145,7 +145,7 @@ int Examine(mddev_dev_t devlist, int brief, int scan, sep=','; } } - free(ap->super); + ap->st->ss->free_super(ap->super); /* FIXME free ap */ if (ap->spares || brief > 1) printf("\n"); -- cgit