bdev/raid: Remove unnecessary zero clear to to-be-freed data

Some data is freed but is cleared to zero just before the free.
They are not necessary and can be removed.

Change-Id: Ia4d789ef77c22059c412ee3c974ab0cf068d6c67
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/454412
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
Shuhei Matsumoto 2019-05-14 13:25:58 +09:00 committed by Jim Harris
parent 8632afe72c
commit f34b81a283

View File

@ -145,7 +145,6 @@ raid_bdev_destroy_cb(void *io_device, void *ctx_buf)
/* Free base bdev channels */
assert(raid_ch->base_channel[i] != NULL);
spdk_put_io_channel(raid_ch->base_channel[i]);
raid_ch->base_channel[i] = NULL;
}
free(raid_ch->base_channel);
raid_ch->base_channel = NULL;
@ -175,9 +174,7 @@ raid_bdev_cleanup(struct raid_bdev *raid_bdev)
}
TAILQ_REMOVE(&g_raid_bdev_list, raid_bdev, global_link);
free(raid_bdev->bdev.name);
raid_bdev->bdev.name = NULL;
free(raid_bdev->base_bdev_info);
raid_bdev->base_bdev_info = NULL;
if (raid_bdev->config) {
raid_bdev->config->raid_bdev = NULL;
}