Commit f34b81a2 authored by Shuhei Matsumoto's avatar Shuhei Matsumoto Committed by Jim Harris
Browse files

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: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/454412


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent 8632afe7
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -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;
	}