e96a076b51
Use free() instead of realloc() to free allocated memory. Currently realloc() is used to free memory unintentionally. Hence the pointer is not nullified and it has caused double free. realloc(g_spdk_raid_config.raid_bdev_config, 0) is equivalent to free(g_spdk_raid_config.raid_bdev_config). Use Shuhei's patch https://review.gerrithub.io/#/c/spdk/spdk/+/420224/ as a reference. Fixes GitHub issue #372. Change-Id: If3b761e3ac10844f734dab9b10d202db9ddc79c0 Signed-off-by: Chen Wang <chenx.wang@intel.com> Reviewed-on: https://review.gerrithub.io/419975 Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> |
||
---|---|---|
.. | ||
aio | ||
error | ||
gpt | ||
iscsi | ||
lvol | ||
malloc | ||
null | ||
nvme | ||
passthru | ||
pmem | ||
raid | ||
rbd | ||
rpc | ||
split | ||
virtio | ||
bdev.c | ||
Makefile | ||
part.c | ||
scsi_nvme.c | ||
vtune.c |