raid0_stop() removes all references to the raid0 configuration but
misses to free the ->devlist buffer.
This patch closes this leak, removes a pointless initialization and
fixes a coding style issue in raid0_stop().
Signed-off-by: Andre Noll <maan@systemlinux.org>
Signed-off-by: NeilBrown <neilb@suse.de>
return 0;
}
-static int raid0_stop (mddev_t *mddev)
+static int raid0_stop(mddev_t *mddev)
{
raid0_conf_t *conf = mddev_to_conf(mddev);
blk_sync_queue(mddev->queue); /* the unplug fn references 'conf'*/
kfree(conf->strip_zone);
- conf->strip_zone = NULL;
+ kfree(conf->devlist);
kfree(conf);
mddev->private = NULL;
-
return 0;
}