Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a9360abd authored by Mark Bloch's avatar Mark Bloch Committed by Jason Gunthorpe
Browse files

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: 9ed3e5f4 ("IB/uverbs: Build the specs into a radix tree at runtime")
Reported-by: default avatarBart Van Assche <bvanassche@acm.org>
Signed-off-by: default avatarMark Bloch <markb@mellanox.com>
Signed-off-by: default avatarLeon Romanovsky <leonro@mellanox.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
parent de5c95d0
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -248,6 +248,7 @@ void uverbs_destroy_api(struct uverbs_api *uapi)
		kfree(rcu_dereference_protected(*slot, true));
		radix_tree_iter_delete(&uapi->radix, &iter, slot);
	}
	kfree(uapi);
}

struct uverbs_api *uverbs_alloc_api(