RDMA/uverbs: Don't do double free of allocated PD
There is no need to call kfree(pd) because ib_dealloc_pd() internally
frees PD.
Fixes: 21a428a019
("RDMA: Handle PD allocations by IB/core")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
hifive-unleashed-5.1
parent
a2a074ef39
commit
bb61845154
|
@ -440,6 +440,7 @@ static int ib_uverbs_alloc_pd(struct uverbs_attr_bundle *attrs)
|
|||
|
||||
err_copy:
|
||||
ib_dealloc_pd(pd);
|
||||
pd = NULL;
|
||||
err_alloc:
|
||||
kfree(pd);
|
||||
err:
|
||||
|
|
Loading…
Reference in New Issue