浏览代码

ALSA: hdsp: fix memory leak

If the size of the firmware is less than expected size then we are
exiting with the error code but we missed releasing the firmware.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Sudip Mukherjee 10 年之前
父节点
当前提交
29d28c5060
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      sound/pci/rme9652/hdsp.c

+ 1 - 0
sound/pci/rme9652/hdsp.c

@@ -5112,6 +5112,7 @@ static int hdsp_request_fw_loader(struct hdsp *hdsp)
 		dev_err(hdsp->card->dev,
 			"too short firmware size %d (expected %d)\n",
 			   (int)fw->size, HDSP_FIRMWARE_SIZE);
+		release_firmware(fw);
 		return -EINVAL;
 	}