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>
This commit is contained in:
Wei Yongjun 2018-12-22 10:30:30 +00:00 committed by Jason Gunthorpe
parent 58f7c0bfb4
commit f617e5ffe0
1 changed files with 1 additions and 1 deletions

View File

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