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: 5dabcd0456 ("RDMA/srpt: Add support for immediate data")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
这个提交包含在:
Wei Yongjun
2018-12-22 10:30:30 +00:00
提交者 Jason Gunthorpe
父节点 58f7c0bfb4
当前提交 f617e5ffe0

查看文件

@@ -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: