Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp3648694ybd; Tue, 25 Jun 2019 06:17:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqzZXg7XzVxtBrbzMosR1NQnHovZUV1UsdtfPRtggnv2vGHHCwpxCA5UsUXL1RsoIh0kpGmD X-Received: by 2002:a17:90a:37c8:: with SMTP id v66mr32547382pjb.33.1561468629994; Tue, 25 Jun 2019 06:17:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561468629; cv=none; d=google.com; s=arc-20160816; b=jBS47SWiYxNTv5NNPFL1KXx/OA/QpPym8Ri4OAYSmSw8+848XsnXu8uWvcfe62mv4d HmKMA3Or/pCiM6hbu1dWxupZhuRHjQoYlyqr9YJDTyO2sLTDyaCJ5lzeLMG5IVY1Gi0j xx3xstT75MzmaTCTgQZOXNsciLrtq2vWVmfSKXIIzWYC15U/FQLf3zHYoVSTr1GAtmWT qMQThFtQeieO7xglO0iBQqs2md4Zxin+9H4SB2KkovfcCzW62AbRSusyyDzpkO8UjEe5 H0oNJQQ4DCIxEVaJhRXCYHbxCWSV1AzA1AlQtDMTavTSpc4GA6Noxlb4HG+XWulExQnw oPdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=b2J4Pt7t4hYVG7ofjpjNHmNyJ482a3sq6kwtJg/kj00=; b=KEDY2UM1IglwQqizGNk9MLNBqnYyouAGR0KsciZlU9PeTmT23B5CiaTpUoy+x5XbH+ xsS78b4z1hZSrKGhKMjZKHuAR/90KXUCfsj7BEElEj6iT83NomJCgDAex0ZAZJ7MG/65 w1iOMGnLSmKdDca7fblrny+gzD5JLIPqa6kxGDuj1tBTrZ93pQpD8EfMgVZHJjKBl2wr ZfM5dnWnUQvXe9yA2EKK1KqWrolv+MtYRWQWyXFLLewIvMyqFpGt+2Qykgslj+FqSuVI xahwUCFLkLYRs49RYwCBwDAeau4+fjm6Aa5qws44RR69rQrTkxhEx8CRCdN/TAuWNBks EeQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=pp7H62C8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d10si12225123pgo.359.2019.06.25.06.16.53; Tue, 25 Jun 2019 06:17:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=pp7H62C8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728506AbfFYMCQ (ORCPT + 99 others); Tue, 25 Jun 2019 08:02:16 -0400 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:55434 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727091AbfFYMCQ (ORCPT ); Tue, 25 Jun 2019 08:02:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=b2J4Pt7t4hYVG7ofjpjNHmNyJ482a3sq6kwtJg/kj00=; b=pp7H62C8OUex2EpyNRapqgEJN bRL9VIiNb8IuO2noOl3YFsOczGlTpPE6vgs/UFEa7EOsdHSJrCaI4fCe9PGZHysZk8x6ojEX7kwgW EI0f0Rsa5NvJIrUya5hdhCGDzvZmIYdRvIAkHQf3Dpd22St9v2JsrQGL5bKflSXAAHG5M=; Received: from cpc102320-sgyl38-2-0-cust46.18-2.cable.virginm.net ([82.37.168.47] helo=finisterre.sirena.org.uk) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hfk8s-0005Dt-KL; Tue, 25 Jun 2019 12:01:42 +0000 Received: by finisterre.sirena.org.uk (Postfix, from userid 1000) id A18BC440046; Tue, 25 Jun 2019 13:01:41 +0100 (BST) Date: Tue, 25 Jun 2019 13:01:41 +0100 From: Mark Brown To: Amadeusz =?utf-8?B?U8WCYXdpxYRza2k=?= Cc: alsa-devel@alsa-project.org, Jaroslav Kysela , Takashi Iwai , Liam Girdwood , Pierre-Louis Bossart , Jie Yang , Cezary Rojewski , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 03/11] ASoC: compress: Fix memory leak from snd_soc_new_compress Message-ID: <20190625120141.GQ5316@sirena.org.uk> References: <20190617113644.25621-1-amadeuszx.slawinski@linux.intel.com> <20190617113644.25621-4-amadeuszx.slawinski@linux.intel.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="FpiZi7hT3UZZkRL4" Content-Disposition: inline In-Reply-To: <20190617113644.25621-4-amadeuszx.slawinski@linux.intel.com> X-Cookie: Editing is a rewording activity. User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --FpiZi7hT3UZZkRL4 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jun 17, 2019 at 01:36:36PM +0200, Amadeusz S=C5=82awi=C5=84ski wrot= e: > Change kzalloc to devm_kzalloc, so compr gets automatically freed when > it's no longer needed. >=20 > Signed-off-by: Amadeusz S=C5=82awi=C5=84ski > --- > sound/soc/soc-compress.c | 17 ++++++----------- > 1 file changed, 6 insertions(+), 11 deletions(-) This will mean it'll get freed at some point if the driver for the device it's allocated against gets removed but it will still get allocated every time the card gets instntiated (eg, due to deferred probe or due to some other driver getting probed and removed). --FpiZi7hT3UZZkRL4 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAl0SDSQACgkQJNaLcl1U h9CaAwf8DVsk20XPT9zYetddOVSYB+aF3yUzSct7IemG29IlKRZZc/cPOycQkP92 weS9wGPzizmWuHiwwDCOsP9SooYKsYyYIRXJOldfrt4/tjnfuNNsjpF21/moUeoj rDjJ2RZVz5qwKTkRuNxclDfo0i44/SKK+Mr5hcNGYV1G7hYngza5x45WwsY3N20F 56cNs8ct+Yd25TbrskUE+reGVIoSGrNei8tDunr9BOegLB/FAUdbFYZ61doHesf4 O+X+iNhE+/GbGAzxMUm5jZ6yDR2VEz63Kx4jtJ+auG1d5bOReWXxc/8ezeucdGMd G4ZL2CALbTKAHgvtZu29cZaZ81T4Ew== =m/VR -----END PGP SIGNATURE----- --FpiZi7hT3UZZkRL4--