Skip to content

Commit a9360ab

Browse files
mark-blochjgunthorpe
authored andcommitted
IB/uverbs: Free uapi on destroy
Make sure we free struct uverbs_api once we clean the radix tree. It was allocated by uverbs_alloc_api(). Fixes: 9ed3e5f ("IB/uverbs: Build the specs into a radix tree at runtime") Reported-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Mark Bloch <markb@mellanox.com> Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
1 parent de5c95d commit a9360ab

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/infiniband/core/uverbs_uapi.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,7 @@ void uverbs_destroy_api(struct uverbs_api *uapi)
248248
kfree(rcu_dereference_protected(*slot, true));
249249
radix_tree_iter_delete(&uapi->radix, &iter, slot);
250250
}
251+
kfree(uapi);
251252
}
252253

253254
struct uverbs_api *uverbs_alloc_api(

0 commit comments

Comments
 (0)