diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2011-11-30 11:49:38 +0300 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-11-30 15:08:59 -0500 |
commit | ad9547c0413686a23e48793665a9ebd3e65c474c (patch) | |
tree | 3d2bbe0cf1f0f6420b9886adc432ccd67f5b56d0 /drivers/net/wireless/brcm80211 | |
parent | 7468722b681ff4ea3f2cb612a28943c01c1b492a (diff) |
brcm80211: fmac: small memory leak on error
We should free "bus_if" here, it's a small leak but it makes the static
checkers happy.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/brcm80211')
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c index 77f84f8a008..b416e274c67 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c @@ -477,8 +477,10 @@ static int brcmf_ops_sdio_probe(struct sdio_func *func, if (!bus_if) return -ENOMEM; sdiodev = kzalloc(sizeof(struct brcmf_sdio_dev), GFP_KERNEL); - if (!sdiodev) + if (!sdiodev) { + kfree(bus_if); return -ENOMEM; + } sdiodev->dev = &func->card->dev; sdiodev->func[0] = func->card->sdio_func[0]; sdiodev->func[1] = func; |