From patchwork Fri Sep 11 13:40:38 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudip Mukherjee X-Patchwork-Id: 7161821 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 5FC439F314 for ; Fri, 11 Sep 2015 13:41:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8B009204AD for ; Fri, 11 Sep 2015 13:41:07 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 6C45F2057F for ; Fri, 11 Sep 2015 13:41:06 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id B6635265A73; Fri, 11 Sep 2015 15:41:04 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, NO_DNS_FOR_FROM, RCVD_IN_DNSWL_LOW, RCVD_IN_SORBS_WEB, T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 6755E261ACA; Fri, 11 Sep 2015 15:40:56 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id AB7D3265A1D; Fri, 11 Sep 2015 15:40:55 +0200 (CEST) Received: from mail-pa0-f53.google.com (mail-pa0-f53.google.com [209.85.220.53]) by alsa0.perex.cz (Postfix) with ESMTP id 7FEBE261A90 for ; Fri, 11 Sep 2015 15:40:48 +0200 (CEST) Received: by padhk3 with SMTP id hk3so75505363pad.3 for ; Fri, 11 Sep 2015 06:40:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=XhkwcPLd3+3gFXRHuHfGBOQO/I6UPqpp6XHu2inennw=; b=isky9SY5ek5H4Eur4yMw+LcrWIGzZSF+jtpbK95gorgrqfESDRKUjmOFmRZBHXI8Su N/vc6LJ87hQcuXTMC/kKdYS/wDXR6UX20AeOH0JKRwbVctgwibannlp4F3TOrgqF3bIj E0HmFRpHZmD8GXoO7ZuqpxAW4X/hWOlkTdRc23tn0uULSjNtifS5NPrkpn2AiCZcCKVV Y51H9Fu/pcdzWBNZhLTczzfKzxU+JwKMdyBydWM7iIebRuCgeFPwE2nInO5uUBL8eOGW yj7feQpCOiAFuytUlKCssi6MaFHMjLNCUCpVJGHMNbnS/Gz9pLT4LUP5e1LlULCQmxpN KmeQ== X-Received: by 10.67.2.98 with SMTP id bn2mr39286801pad.20.1441978847255; Fri, 11 Sep 2015 06:40:47 -0700 (PDT) Received: from localhost.localdomain ([122.169.170.2]) by smtp.gmail.com with ESMTPSA id vv2sm537230pab.21.2015.09.11.06.40.44 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 11 Sep 2015 06:40:46 -0700 (PDT) From: Sudip Mukherjee To: Jaroslav Kysela , Takashi Iwai Date: Fri, 11 Sep 2015 19:10:38 +0530 Message-Id: <1441978838-18803-1-git-send-email-sudipm.mukherjee@gmail.com> X-Mailer: git-send-email 1.9.1 Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Sudip Mukherjee Subject: [alsa-devel] [PATCH] ALSA: hdsp: fix memory leak X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- sound/pci/rme9652/hdsp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/pci/rme9652/hdsp.c b/sound/pci/rme9652/hdsp.c index 9bba275..2875b4f 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; }