Commit ccbd4d41 authored by Jesper Juhl's avatar Jesper Juhl Committed by 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: default avatarJesper Juhl <jj@chaosbits.net>
Acked-by: default avatarIvo van Doorn <IvDoorn@gmail.com>
Acked-by: default avatarPekka Enberg <penberg@kernel.org>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment