diff options
author | Sudip Mukherjee <sudipm.mukherjee@gmail.com> | 2015-09-15 17:22:28 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-09-15 06:47:05 -0700 |
commit | 60eeb4102e9bccb07d4a0d4e79864c8058461847 (patch) | |
tree | 79abe56b1ddd499ce44a2223fdf1dd68dcaa6719 | |
parent | 7d05652c5ce812b4d1addd1a2733d20c912d528d (diff) |
staging: rtl8192e: fix memory leak
If the size of the firmware is not as expected then we are jumping to the
error path but we missed releasing the firmware.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/rtl8192e/rtl8192e/r8192E_firmware.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_firmware.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_firmware.c index 5c527c419bc9..3c1b86cce8d6 100644 --- a/drivers/staging/rtl8192e/rtl8192e/r8192E_firmware.c +++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_firmware.c @@ -273,6 +273,7 @@ bool rtl92e_init_fw(struct net_device *dev) sizeof(pfirmware->firmware_buf[i])) { RT_TRACE(COMP_FIRMWARE, "img file size exceed the container struct buffer fail!\n"); + release_firmware(fw_entry); goto download_firmware_fail; } |