Skip to contentSkip to conversation

staging: rtl8192e: fix memory leak

PATCH New Sudip Mukherjee 1 participant 1 message Sep 15, 2015 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 drivers/staging/rtl8192e/rtl8192e/r8192E_firmware.c | 1 +
 1 file changed, 1 insertion(+)
drivers/staging/rtl8192e/rtl8192e/r8192E_firmware.c +1 -0
index 5c527c4..3c1b86c 100644
@@ -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;
 				}
 
Signature · 1 line
1.9.1