reduce: check pmem buf before unmap
Fixed issue #831 Change-Id: Id589290f3aa729572fa81daf735cecdc8e2adb84 Signed-off-by: Chunyang Hui <chunyang.hui@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/458563 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Paul Luse <paul.e.luse@intel.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
parent
73a171a07c
commit
863f17d609
@ -371,7 +371,10 @@ _init_load_cleanup(struct spdk_reduce_vol *vol, struct reduce_init_load_ctx *ctx
|
||||
}
|
||||
|
||||
if (vol != NULL) {
|
||||
pmem_unmap(vol->pm_file.pm_buf, vol->pm_file.size);
|
||||
if (vol->pm_file.pm_buf != NULL) {
|
||||
pmem_unmap(vol->pm_file.pm_buf, vol->pm_file.size);
|
||||
}
|
||||
|
||||
spdk_dma_free(vol->backing_super);
|
||||
spdk_bit_array_free(&vol->allocated_chunk_maps);
|
||||
spdk_bit_array_free(&vol->allocated_backing_io_units);
|
||||
|
Loading…
x
Reference in New Issue
Block a user