提交 54438f9d 编写于 作者: T Tilman Schmidt 提交者: David S. Miller

isdn/gigaset: fix leaks in error path

Take care to free all previously allocated ressources in the
"out of memory" error path of the ISDN_CMD_DIAL branch.
Based on an original patch by Dan Carpenter.

Impact: bugfix
Reported-by: NDan Carpenter <error27@gmail.com>
Signed-off-by: NTilman Schmidt <tilman@imap.cc>
Acked-by: NDan Carpenter <error27@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 7d060ed2
......@@ -419,6 +419,8 @@ static int command_from_LL(isdn_ctrl *cntrl)
dev_err(bcs->cs->dev, "out of memory\n");
for (i = 0; i < AT_NUM; ++i)
kfree(commands[i]);
kfree(commands);
gigaset_free_channel(bcs);
return -ENOMEM;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册