+11
−9
Loading
In blob_serialize_add_page(), *pages is set to spdk_realloc(*pages). If spdk_realloc() returns NULL, the *pages pointer will be overridden, whose memory will leak. Here, we introduce a new var (tmp_pages) for checking the return value of spdk_realloc(*pages). Signed-off-by:Zhiqiang Liu <liuzhiqiang26@huawei.com> Change-Id: Ib2ead3f3b5d5e44688d1f0568816f483aa9e101f Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8307 Community-CI: Mellanox Build Bot Tested-by:
SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by:
Aleksey Marchuk <alexeymar@mellanox.com> Reviewed-by:
Tomasz Zawadzki <tomasz.zawadzki@intel.com>