In spdk_idxd_get_channel(), if chan->batch_base is allocated faild, we should free chan before returning NULL. Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com> Change-Id: Ia652c334aead592429c1171da73d67160879686d Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8301 Community-CI: Mellanox Build Bot Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>