Skip to contentSkip to conversation

media: dvb-frontends: fix leak of memory fw

PATCH New [email protected] 1 participant 1 message Apr 18, 2022 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 media: dvb-frontends: fix leak of memory fw

From: Yan Lei <[email protected]>

---
 drivers/media/dvb-frontends/bcm3510.c | 1 +
 1 file changed, 1 insertion(+)
drivers/media/dvb-frontends/bcm3510.c +1 -0
index da0ff7b44..68b92b441
@@ -649,6 +649,7 @@ static int bcm3510_download_firmware(struct dvb_frontend* fe)
 		deb_info("firmware chunk, addr: 0x%04x, len: 0x%04x, total length: 0x%04zx\n",addr,len,fw->size);
 		if ((ret = bcm3510_write_ram(st,addr,&b[i+4],len)) < 0) {
 			err("firmware download failed: %d\n",ret);
+			release_firmware(fw);
 			return ret;
 		}
 		i += 4 + len;
Signature · 1 line
2.30.0