From: Sudip Mukherjee Date: Fri, 11 Sep 2015 13:40:38 +0000 (+0530) Subject: ALSA: hdsp: fix memory leak X-Git-Tag: KARO-TX6UL-2015-11-03~80^2~103 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=29d28c5060023e661965c51c7e8f53bc9eb44fc4;p=karo-tx-linux.git 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 Signed-off-by: Takashi Iwai --- 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; }