提交 ccbd4d41 编写于 作者: J Jesper Juhl 提交者: John W. Linville

rt2x00: Don't leak mem in error path of rt2x00lib_request_firmware()

We need to release_firmware() in order not to leak memory.
Signed-off-by: NJesper Juhl <jj@chaosbits.net>
Acked-by: NIvo van Doorn <IvDoorn@gmail.com>
Acked-by: NPekka Enberg <penberg@kernel.org>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 35b3ac47
......@@ -58,6 +58,7 @@ static int rt2x00lib_request_firmware(struct rt2x00_dev *rt2x00dev)
if (!fw || !fw->size || !fw->data) {
ERROR(rt2x00dev, "Failed to read Firmware.\n");
release_firmware(fw);
return -ENOENT;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册