浏览代码

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.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Sudip Mukherjee 9 年之前
父节点
当前提交
c14a82c781
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      sound/soc/intel/skylake/skl-topology.c

+ 1 - 0
sound/soc/intel/skylake/skl-topology.c

@@ -1511,6 +1511,7 @@ int skl_tplg_init(struct snd_soc_platform *platform, struct hdac_ext_bus *ebus)
 	release_firmware(fw);
 	if (ret < 0) {
 		dev_err(bus->dev, "tplg component load failed%d\n", ret);
+		release_firmware(fw);
 		return -EINVAL;
 	}