summaryrefslogtreecommitdiffstats
path: root/sound/pci/rme9652
diff options
context:
space:
mode:
authorSudip Mukherjee2015-09-11 15:40:38 +0200
committerTakashi Iwai2015-09-11 17:35:11 +0200
commit29d28c5060023e661965c51c7e8f53bc9eb44fc4 (patch)
tree918f0d0aa7d049c93464460ff74a14f249fcd8d2 /sound/pci/rme9652
parentALSA: usb-audio: Change internal PCM order (diff)
downloadkernel-qcow2-linux-29d28c5060023e661965c51c7e8f53bc9eb44fc4.tar.gz
kernel-qcow2-linux-29d28c5060023e661965c51c7e8f53bc9eb44fc4.tar.xz
kernel-qcow2-linux-29d28c5060023e661965c51c7e8f53bc9eb44fc4.zip
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>
Diffstat (limited to 'sound/pci/rme9652')
-rw-r--r--sound/pci/rme9652/hdsp.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/pci/rme9652/hdsp.c b/sound/pci/rme9652/hdsp.c
index 9bba275b4c9b..2875b4f6d8c9 100644
--- a/sound/pci/rme9652/hdsp.c
+++ b/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;
}