66af6221a0
In the case of bdev initialization, the memory could not be allocated. When cleaning up, it needs to check whether the memory pointer is valid or not before touching the address of the pointer. This is to fix below issue: https://github.com/spdk/spdk/issues/1126 Change-Id: Iec0e2c5a40ad153a96fb939414a15ac3b9112a01 Signed-off-by: GangCao <gang.cao@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478849 Community-CI: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: <box.b.chen@intel.com> Reviewed-by: yidong0635 <dongx.yi@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>