From: Stefan Weil <[email protected]> This error was spotted by cppcheck:
drivers/staging/brcm80211/phy/wlc_phy_lcn.c:4053: error: Memory leak: ptr Cc: Brett Rudley <[email protected]> Cc: Henry Ptasinski <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Signed-off-by: Stefan Weil <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> --- .../staging/brcm80211/brcmsmac/phy/wlc_phy_lcn.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/staging/brcm80211/brcmsmac/phy/wlc_phy_lcn.c b/drivers/staging/brcm80211/brcmsmac/phy/wlc_phy_lcn.c index 3fbbbb4..f027d50 100644 --- a/drivers/staging/brcm80211/brcmsmac/phy/wlc_phy_lcn.c +++ b/drivers/staging/brcm80211/brcmsmac/phy/wlc_phy_lcn.c @@ -4051,6 +4051,7 @@ wlc_lcnphy_a1(phy_info_t *pi, int cal_type, int num_levels, int step_size_lg2) phy_c32 = kmalloc(sizeof(u16) * 20, GFP_ATOMIC); if (NULL == phy_c32) { + kfree(ptr); return; } phy_c26 = read_phy_reg(pi, 0x6da); -- 1.7.4.1 _______________________________________________ devel mailing list [email protected] http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
