提交 ae9a3405 编写于 作者: J Jesper Juhl 提交者: Kalle Valo

ath6kl: fix memory leak in ath6kl_fwlog_block_read()

If, in
drivers/net/wireless/ath/ath6kl/debug.c::ath6kl_fwlog_block_read(),
the call to wait_for_completion_interruptible() returns -ERESTARTSYS
then we'll return without freeing the (as yet unused) memory we
allocated for 'buf' - thus leaking it.
Signed-off-by: NJesper Juhl <jj@chaosbits.net>
Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
上级 6146ca69
......@@ -407,8 +407,10 @@ static ssize_t ath6kl_fwlog_block_read(struct file *file,
ret = wait_for_completion_interruptible(
&ar->debug.fwlog_completion);
if (ret == -ERESTARTSYS)
if (ret == -ERESTARTSYS) {
vfree(buf);
return ret;
}
spin_lock(&ar->debug.fwlog_queue.lock);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册