diff options
author | Leon Romanovsky <leonro@mellanox.com> | 2019-02-13 18:07:05 +0100 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2019-02-25 23:00:48 +0100 |
commit | bb618451544ca9152a1a213d0a2b93d231c4cce1 (patch) | |
tree | c2ee489fcfdfd8c65764e7f091f8f2af6097c810 /drivers/infiniband | |
parent | RDMA: Handle ucontext allocations by IB/core (diff) | |
download | linux-bb618451544ca9152a1a213d0a2b93d231c4cce1.tar.xz linux-bb618451544ca9152a1a213d0a2b93d231c4cce1.zip |
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: 21a428a019c9 ("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>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/core/uverbs_cmd.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/infiniband/core/uverbs_cmd.c b/drivers/infiniband/core/uverbs_cmd.c index 3128821ca36e..062a86c04123 100644 --- a/drivers/infiniband/core/uverbs_cmd.c +++ b/drivers/infiniband/core/uverbs_cmd.c @@ -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: |