Re: [PATCH] caif: fix cfcnfg_add_phy_layer() leaks

From: David Miller
Date: Mon Oct 24 2011 - 18:36:33 EST


From: Jesper Juhl <jj@xxxxxxxxxxxxx>
Date: Tue, 25 Oct 2011 00:01:00 +0200 (CEST)

> There are two locations where we 'goto out' after having allocated
> memory for 'phyinfo' but have not yet assigned it to anything. At the
> 'out:' label we'll exit from the function and 'phyinfo' will go out of
> scope and thus we leak the memory we allocated.
>
> This patch frees the memory before jumping to 'out:', thus fixing the
> leaks.
>
> Signed-off-by: Jesper Juhl <jj@xxxxxxxxxxxxx>

The code in net-next looks a lot different, please see if the issue
still exists there and resubmit if so, thanks!
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/