Skip to content

Commit

Permalink
rt2x00: Don't leak mem in error path of rt2x00lib_request_firmware()
Browse files Browse the repository at this point in the history
We need to release_firmware() in order not to leak memory.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Pekka Enberg <penberg@kernel.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Jesper Juhl authored and John W. Linville committed Jan 13, 2011
1 parent 35b3ac4 commit ccbd4d4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/wireless/rt2x00/rt2x00firmware.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit ccbd4d4

Please sign in to comment.