Message ID | 1464874375-12114-1-git-send-email-sudipm.mukherjee@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C604D60467 for <patchwork-linux-arm@patchwork.kernel.org>; Thu, 2 Jun 2016 18:04:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A21A02830C for <patchwork-linux-arm@patchwork.kernel.org>; Thu, 2 Jun 2016 18:04:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 96BE02831B; Thu, 2 Jun 2016 18:04:53 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=2.0 tests=BAYES_00, DATE_IN_PAST_03_06, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,FREEMAIL_FROM,RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 357002830C for <patchwork-linux-arm@patchwork.kernel.org>; Thu, 2 Jun 2016 18:04:53 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1b8Wy0-0003pE-Mp; Thu, 02 Jun 2016 18:03:36 +0000 Received: from mail-pf0-x241.google.com ([2607:f8b0:400e:c00::241]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1b8Wxx-0003ii-T5 for linux-arm-kernel@lists.infradead.org; Thu, 02 Jun 2016 18:03:34 +0000 Received: by mail-pf0-x241.google.com with SMTP id f144so8793556pfa.2 for <linux-arm-kernel@lists.infradead.org>; Thu, 02 Jun 2016 11:03:13 -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=pkxUmOV9azOCqJ99k2CYXB0OXT+soY2YaSczRjnWNSg=; b=QdcnsSIIk087B9VAEuEProXOy5swBZ3gw08oILjEnvxZBc4DBI4gn6/v/Tn0efBuKz P3Nhdq7gcDEtKegU8zMp0H5fRMEiW1JlMUw11Bf8GNccDDnwNHlkg9y0em+408DOriTV 5tZ7Y7vigSLdkbVLquUNUv2agJBn4oIyST35/qWKvuseLxk+wIC+hC/Mwr4Wb8D3ZAG2 wEHqNzkGomku6BnFoRh9K5rsDXrTbbTFDu++OkYLz4vzbYZVeagkDIuUR95BoHAkV8qJ DeI3s9rBNea2ju2Ra/DlVQSMh7Blcr9r9khAXGRKKTfgSISr2PxT7FkXaAmLkPYE5CSC Azow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=pkxUmOV9azOCqJ99k2CYXB0OXT+soY2YaSczRjnWNSg=; b=U2ZQ8DMuHRpnSxEU5im0gui+zdoEPJxx/76n+0D+UwCmw7cDcTkKG9owLcks8QcMnD kOm3u4VkPP7YOPldmnAjuuxTSGp6EDABbZS7AIdJe2gJin7y3rDsKMwsSLx0TtNqgarF g5znk/w7ezhdaY88MpE42PzEzY0HerRR5UI0KWgXHANm8xfsymBJs0/rETKgankFSORi /glRqbU7P30/8JBI9YdtqsgBT+tQGEsdlNNG1nXarAFgTc6nsnc8rfwxmta/xDhjXpf1 1VrB/IZoTOruKhezuQM/VI+FuL4r1ALVzRQjGTXURpdS0U90BEw4BrQloLIh/QMt4jnB 5tXQ== X-Gm-Message-State: ALyK8tKtM16uuvt3rRvcvj+6cEJ8JBXwzx4FM8OuVVaSyfxtf29RvrcgrfhpSTW+3r4Pjw== X-Received: by 10.98.108.3 with SMTP id h3mr2853168pfc.15.1464890593088; Thu, 02 Jun 2016 11:03:13 -0700 (PDT) Received: from localhost.localdomain ([103.24.124.194]) by smtp.gmail.com with ESMTPSA id i8sm22852182pao.26.2016.06.02.11.03.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 02 Jun 2016 11:03:12 -0700 (PDT) From: Sudip Mukherjee <sudipm.mukherjee@gmail.com> To: Srinivas Kandagatla <srinivas.kandagatla@gmail.com>, Maxime Coquelin <maxime.coquelin@st.com>, Patrice Chotard <patrice.chotard@st.com>, Mauro Carvalho Chehab <mchehab@osg.samsung.com> Subject: [PATCH] [media] c8sectpfe: fix memory leak Date: Thu, 2 Jun 2016 19:02:55 +0530 Message-Id: <1464874375-12114-1-git-send-email-sudipm.mukherjee@gmail.com> X-Mailer: git-send-email 1.9.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160602_110333_992479_1DA9FC2F X-CRM114-Status: GOOD ( 11.77 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com>, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel@stlinux.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c b/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c index 7dddf77..30c148b 100644 --- a/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c +++ b/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c @@ -1161,6 +1161,7 @@ static int load_c8sectpfe_fw(struct c8sectpfei *fei) if (err) { dev_err(fei->dev, "c8sectpfe_elf_sanity_check failed err=(%d)\n" , err); + release_firmware(fw); return err; }
We have assigned memory while requesting the firmware but if the sanity check fails then we are not releasing the firmware. Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk> --- drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c | 1 + 1 file changed, 1 insertion(+)