Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1772471imm; Thu, 27 Sep 2018 02:12:04 -0700 (PDT) X-Google-Smtp-Source: ACcGV62DFBzr8P40tegid1WRg3UoIQ0uCN0GRVcpGVqGQWYFPcFB4pKW58R/1c/rpzeJS6LII3eR X-Received: by 2002:a62:1f9d:: with SMTP id l29-v6mr10158895pfj.121.1538039524065; Thu, 27 Sep 2018 02:12:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538039524; cv=none; d=google.com; s=arc-20160816; b=oIBE04rJfnwP9jGmw4szQ/UmOccm7Ph/fiyl0p5mOJ6D+V8xsUA1dseOJPtOOvqd+q f4KfLU42+CI9L2zfDbYjJH0yImzcSU7hbACdR1IMuKTyizaVVLw5fnXHDu5Dn7kVoupB I3UrIxZ5o+mEnxt/FoUwmK90ObcFDmXb4RfoElcULsuCZOBXNjoAE5LAMLwcj2qvxf1l 0wdWE0Py1hM6U4AiXiCbnMzKjG+4/Y/ByjeRnK9jV7KlYPsnK5fD1NFIcs6TJLTQj2kv Wd/NYdA+2oOiHLMdD61rP9d039j0i2ofUZxtlymkUiWubhDTc077gddYWVBU+own9qnU LGIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from; bh=RrYR7c7kmahj2fZWuB/iqhSMYZvqcID3jatiUqkZ6Kc=; b=Dor4IebbshWtIWb5HyMPSgSNKZH8qC83ApJszBBzj6uo+UsL1owJFr+Y7vEN1v4sem XbPqdSgwhvwqyHKtkAJczEQbqrgrTmWSub3SKAvnfY0NdsHoXgmYf5ut7tcRcc3IvlQT 7GAtelFKcdAf8kwu57p2qGFtEVE22BP5d9jNbK0zHvXOVqyNd6h06+JVTYF4dtOWC6Qx L14zREur0fpWZXEo1ssEnZePWW41SZIn7Db2FL+Z21axaCLG0fAsEB/15rbLL2qoao4f C2phmNHwl6RMMdmqeze6XOOmXcH4jno19bXr3Bg6p2+wKZw1Y3sihmgiTaqe2fqCh5/d cHzg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g7-v6si1505458pll.360.2018.09.27.02.11.48; Thu, 27 Sep 2018 02:12:04 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728301AbeI0P0z (ORCPT + 99 others); Thu, 27 Sep 2018 11:26:55 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:55074 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726962AbeI0P0z (ORCPT ); Thu, 27 Sep 2018 11:26:55 -0400 Received: from localhost (ip-213-127-77-73.ip.prioritytelecom.net [213.127.77.73]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id F04C91116; Thu, 27 Sep 2018 09:09:39 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Takashi Sakamoto , Takashi Iwai Subject: [PATCH 4.18 35/88] ALSA: firewire-tascam: fix memory leak of private data Date: Thu, 27 Sep 2018 11:03:16 +0200 Message-Id: <20180927090304.844935692@linuxfoundation.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180927090300.631426620@linuxfoundation.org> References: <20180927090300.631426620@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Takashi Sakamoto commit 8d28277c065a974873c6781d44b7bcdcd8fb4e8a upstream. Although private data of sound card instance is usually allocated in the tail of the instance, drivers in ALSA firewire stack allocate the private data before allocating the instance. In this case, the private data should be released explicitly at .private_free callback of the instance. This commit fixes memory leak following to the above design. Fixes: b610386c8afb ('ALSA: firewire-tascam: deleyed registration of sound card') Cc: # v4.7+ Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai Signed-off-by: Greg Kroah-Hartman --- sound/firewire/tascam/tascam.c | 1 + 1 file changed, 1 insertion(+) --- a/sound/firewire/tascam/tascam.c +++ b/sound/firewire/tascam/tascam.c @@ -93,6 +93,7 @@ static void tscm_free(struct snd_tscm *t fw_unit_put(tscm->unit); mutex_destroy(&tscm->mutex); + kfree(tscm); } static void tscm_card_free(struct snd_card *card)