1
0
Fork 0

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
Leon Romanovsky 2019-02-13 19:07:05 +02:00 committed by Jason Gunthorpe
parent a2a074ef39
commit bb61845154
1 changed files with 1 additions and 0 deletions

View File

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