提交 ad9547c0 编写于 作者: D Dan Carpenter 提交者: John W. Linville

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: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 7468722b
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册