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:
parent
58f7c0bfb4
commit
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:
|
||||
|
|
Loading…
Reference in New Issue