Re: [PATCH] RDMA/ucma: Fix resource leak on error path

From: Jason Gunthorpe
Date: Wed Sep 02 2020 - 16:11:08 EST


On Wed, Sep 02, 2020 at 05:24:51PM +0100, Alex Dewar wrote:
> In ucma_process_join(), if the call to xa_alloc() fails, the function
> will return without freeing mc. Fix this by jumping to the correct line.
>
> In the process I renamed the jump labels to something more memorable for
> extra clarity.
>
> Addresses-Coverity: ("Resource leak")
> Fixes: 95fe51096b7a ("RDMA/ucma: Remove mc_list and rely on xarray")
> Signed-off-by: Alex Dewar <alex.dewar90@xxxxxxxxx>

Applied to for-next, thanks

Jason