Skip to contentSkip to conversation

ASoC: Intel: Skylake: Fix memory leak

PATCH New Sudip Mukherjee 1 participant 1 message Jan 21, 2016

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: Intel: Skylake: Fix memory leak

If snd_soc_tplg_component_load() fails we just printed an error message and returned the error code but we missed releasing the firmware.

---
 sound/soc/intel/skylake/skl-topology.c | 1 +
 1 file changed, 1 insertion(+)
sound/soc/intel/skylake/skl-topology.c +1 -0
index 4624556..e81c020 100644
@@ -1510,6 +1510,7 @@ int skl_tplg_init(struct snd_soc_platform *platform, struct hdac_ext_bus *ebus)
 					&skl_tplg_ops, fw, 0);
 	if (ret < 0) {
 		dev_err(bus->dev, "tplg component load failed%d\n", ret);
+		release_firmware(fw);
 		return -EINVAL;
 	}
 
Signature · 1 line
1.9.1