From: Sudip Mukherjee Date: Tue, 15 Sep 2015 11:52:28 +0000 (+0530) Subject: staging: rtl8192e: fix memory leak X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=60eeb4102e9bccb07d4a0d4e79864c8058461847;p=linux-beck.git 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 Signed-off-by: Greg Kroah-Hartman --- 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; }