JinYu 3a5abc63b8 test/unit: Make sure the function runs correctly
1,add a judgement to ensure spdk_blob_close() runs correctly.
2,make sure the command has been completed before _spdk_bs_free()
which would avoid heap-use-after-free.

Change-Id: I698521d8d4d8e1d8a7374665d27d6eec6d0b85f5
Signed-off-by: JinYu <jin.yu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/449517
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-04-01 09:11:06 +00:00
..