From patchwork Wed Nov 14 22:11:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 151122 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp6238119ljp; Wed, 14 Nov 2018 14:11:41 -0800 (PST) X-Google-Smtp-Source: AJdET5fNN+88uFckCbo2XEpMZvmJTdn5Nx7pOSKJrIxM7Gpww/YGuwBAumAP0h1frtUew8nz5gDH X-Received: by 2002:adf:91a1:: with SMTP id 30-v6mr3455318wri.37.1542233501367; Wed, 14 Nov 2018 14:11:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542233501; cv=none; d=google.com; s=arc-20160816; b=vviYKIDElSZSe8gA1gzbWP6fer+kLjgqfIm5yE11hiewfiSk45Ahioc2JMELxtxMXw H5gI3apj2tc/TBuuIFgkQhL7Sirb+21ae7xrjTQqULRdWE2QRmT+K6RZzvNxHGwfbMQe bqNGa6DdeTO83jZsFyL+4oStMa5vnwND58FP2jU4zk3PMIzMLALDl1ZbLgrNZTj5tRig B6zdhDdnoN5qHt+qGBVGU+2mvGAdTwChbQ8II8+7e6JtjHeykdOUWDYmFEQR23vn6MFB 1LazyzA5+byqyZbi8mKB1lSSGKQ/0avN8DVY0pPKxMdCkOjNZ+LyyVl7IBYJfLuuz83o 8zYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:date:message-id:in-reply-to:to:from :dkim-signature:delivered-to; bh=Zwa2foSQdQ148vxHjVXNIsK19UpWpjyU5nj5y0Z+I8w=; b=0NnWBV0k8On2/0OR1AOvnVVjLEIKKeAKBwffRhJJD8Axx41nBqTlSE4AYpywMGg+a6 zW2xB36NrXCkeKlXoWTBH3jIwQFBJ7u6GqvnASNqR7r39sy6pmX4Qifpq84SHcMYG16+ nEaPFFUBDKEmtEYoVDjHJ5tDKdkR8frZi7AhxCzO2vBJ5Nc6g0lgK9cVo2D4b4qZRxL+ R1GyxCfdb6u5y5VKxw95vJ1I6qgf6kFLXCki7hBem4puv04Usanc+LRxtuF/bof2PHzd HWi9kGfHnYR0+sI9r5XmKjhLax6jsx0fOh08NUzj8PUJlG80NLf4LoFX81Ax59E9Pxwo 4pXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=h43T7nXv; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from alsa0.perex.cz (alsa0.perex.cz. [77.48.224.243]) by mx.google.com with ESMTP id s16-v6si19880434wri.317.2018.11.14.14.11.41; Wed, 14 Nov 2018 14:11:41 -0800 (PST) Received-SPF: pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) client-ip=77.48.224.243; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=h43T7nXv; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id C0DA9267B04; Wed, 14 Nov 2018 23:11:38 +0100 (CET) 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 E311F267B01; Wed, 14 Nov 2018 23:11:35 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE autolearn=disabled version=3.4.0 Received: from heliosphere.sirena.org.uk (heliosphere.sirena.org.uk [172.104.155.198]) by alsa0.perex.cz (Postfix) with ESMTP id 2D363267AFF for ; Wed, 14 Nov 2018 23:11:34 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=Date:Message-Id:In-Reply-To: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References: List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner: List-Archive; bh=4bGydbmZCbF+HHVxwGrabMACwECgqEd26rtAAXHW1H8=; b=h43T7nXvU8Yz hKZ9ZY/AoISCmjb95L7tXbDQ4zYFE3iqZ5cBvgmyTMud84DUpEV874vxM6p91viH7o3GS4tpp9nGH lh1u+uMxH57FzXoFqXQmhZn3vZtoc7z/Ng86m07T1gPPkbWQGcp3AyS1zPaqLYeZENvJjzwx9frMg mfmaE=; Received: from [64.114.255.97] (helo=finisterre.ee.mobilebroadband) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1gN3Nl-0004Yz-IC; Wed, 14 Nov 2018 22:11:33 +0000 Received: by finisterre.ee.mobilebroadband (Postfix, from userid 1000) id BDB32440078; Wed, 14 Nov 2018 22:11:28 +0000 (GMT) From: Mark Brown To: Colin Ian King In-Reply-To: Message-Id: <20181114221128.BDB32440078@finisterre.ee.mobilebroadband> Date: Wed, 14 Nov 2018 22:11:28 +0000 (GMT) Cc: alsa-devel@alsa-project.org, Mark Brown Subject: [alsa-devel] Applied "ASoC: amd: fix memory leak of i2s_data on error return" to the asoc tree 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 The patch ASoC: amd: fix memory leak of i2s_data on error return has been applied to the asoc tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark >From 46dce4042659755a2b9753369d0c2d8ca33e35cf Mon Sep 17 00:00:00 2001 From: Colin Ian King Date: Wed, 14 Nov 2018 21:31:48 +0000 Subject: [PATCH] ASoC: amd: fix memory leak of i2s_data on error return Currently when snd_pcm_hw_constraint_integer fails there is a memory leak of i2s_data on the error return path. Fix this by kfree'ing i2s_data before returning. Detected by CoverityScan, CID#1475479 ("Resource leak") Fixes: 0b87d6bcd648 ("ASoC: amd: add acp3x pcm driver dma ops") Signed-off-by: Colin Ian King Signed-off-by: Mark Brown --- sound/soc/amd/raven/acp3x-pcm-dma.c | 1 + 1 file changed, 1 insertion(+) -- 2.19.1 _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel diff --git a/sound/soc/amd/raven/acp3x-pcm-dma.c b/sound/soc/amd/raven/acp3x-pcm-dma.c index 2e61cef00f41..b16cdd187139 100644 --- a/sound/soc/amd/raven/acp3x-pcm-dma.c +++ b/sound/soc/amd/raven/acp3x-pcm-dma.c @@ -309,6 +309,7 @@ static int acp3x_dma_open(struct snd_pcm_substream *substream) SNDRV_PCM_HW_PARAM_PERIODS); if (ret < 0) { dev_err(component->dev, "set integer constraint failed\n"); + kfree(i2s_data); return ret; }