Commit f617e5ff authored by Wei Yongjun's avatar Wei Yongjun Committed by Jason Gunthorpe
Browse files

RDMA/srpt: Use kmem_cache_free() instead of kfree()



memory allocated by kmem_cache_alloc() should be freed using
kmem_cache_free(), not kfree().

Fixes: 5dabcd04 ("RDMA/srpt: Add support for immediate data")
Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
parent 58f7c0bf
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -674,7 +674,7 @@ static struct srpt_ioctx *srpt_alloc_ioctx(struct srpt_device *sdev,
	return ioctx;

err_free_buf:
	kfree(ioctx->buf);
	kmem_cache_free(buf_cache, ioctx->buf);
err_free_ioctx:
	kfree(ioctx);
err: