Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1771356imm; Thu, 27 Sep 2018 02:10:46 -0700 (PDT) X-Google-Smtp-Source: ACcGV62ITnW5tDwjf5KZIXxUMPfJ6NwQeFpD8smh6K27n77oyyKfC8zIojB3tmJHJcwsFBQUUmVP X-Received: by 2002:a17:902:9693:: with SMTP id n19-v6mr9986086plp.282.1538039446420; Thu, 27 Sep 2018 02:10:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538039446; cv=none; d=google.com; s=arc-20160816; b=hbpI1SbA977pZwsY6Lr719KysoEzN6063T99ypwsff/ljZwuEpk3a2MvzTanlBmMFG lr+jY5FA7VJPZ99KUkVCc+CSmPP11svbmW3koBnypatdGdFui3smZTp9V9g9p+35zJyl jcxOjZXZyRLpn5nHutZktIxuidhB2+tjk5smpfO45BXhtt2Vy22yRrkvwwA4vG0iCbE0 hijIwigZiwI8pvG78JmBkREJk9zJQam53+aTzDPhZcUVfdtrPwg89XpauBU+oPr25mtu BpyxFL4TOJTgugzTRHCXQhrgbgksQTV3CkU2QV9St9+2zdOW8Oz+0KoQpEQUTPXlV1fe /lYw== 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=YXmgzZnCX5r7X4QbnkIxOjSSsGfkuusUygWqcUEXd+o=; b=zSyk1vTjaRWopw2f9jlSkbiKtKiCkKaMKeKZMPHsGe7f4oRqHdZRIJyNPVudsU3QUw pxHwLar3c53npuh40Sk4XGzmZqYHOd9HfEQX6vfbf/IBtyJjwsc1wEGqA1wfG7quM8v1 gg55c7X1oHhKokqyGWKree14XSN+FwuKHvfqxoavUVM0Jw50QZf+NqTmzIwXHrSVR5+s bAo0r0l77+/q6hV/Q9XZwQ0NjkKvGRRGldZpqq0LJQagX1/BNf0mKAjz7Lf9fjj98Fk/ z5PfDvvfjHna1nX70cTwEvJVuAaMODElySm79FlTZ/rLqYQonChdHzEgcaZchsGZRlhl 3kwA== 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 f15-v6si1524978pgi.378.2018.09.27.02.10.31; Thu, 27 Sep 2018 02:10:46 -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 S1728288AbeI0P0u (ORCPT + 99 others); Thu, 27 Sep 2018 11:26:50 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:55066 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726962AbeI0P0t (ORCPT ); Thu, 27 Sep 2018 11:26:49 -0400 Received: from localhost (ip-213-127-77-73.ip.prioritytelecom.net [213.127.77.73]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 2DA681116; Thu, 27 Sep 2018 09:09:33 +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 34/88] ALSA: firewire-digi00x: fix memory leak of private data Date: Thu, 27 Sep 2018 11:03:15 +0200 Message-Id: <20180927090304.713304205@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 a49a83ab05e34edd6c71a4fbd062c9a7ba6d18aa 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: 86c8dd7f4da3 ('ALSA: firewire-digi00x: delayed 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/digi00x/digi00x.c | 1 + 1 file changed, 1 insertion(+) --- a/sound/firewire/digi00x/digi00x.c +++ b/sound/firewire/digi00x/digi00x.c @@ -49,6 +49,7 @@ static void dg00x_free(struct snd_dg00x fw_unit_put(dg00x->unit); mutex_destroy(&dg00x->mutex); + kfree(dg00x); } static void dg00x_card_free(struct snd_card *card)