Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1773775imm; Thu, 27 Sep 2018 02:13:37 -0700 (PDT) X-Google-Smtp-Source: ACcGV622pOOpxGRTUCfrQdoV72PVRYv2DUm68yYt+58vzrX49soir/gHeRl1Pbfyi0Ofi9/1hiFA X-Received: by 2002:a63:e5e:: with SMTP id 30-v6mr9367196pgo.320.1538039616889; Thu, 27 Sep 2018 02:13:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538039616; cv=none; d=google.com; s=arc-20160816; b=1D8deNZHdJdWh57vyQ5/ugpks0f8guWDKkoF+pYxFfpFYCbPBJINpImAUUSY2mw+05 XpfmgeRbV/1YNg5iMSigJKjiqNJDanvPMBA12QFWKDb4EVmOzSceGO8vtOSf/xRfZxEf VL5mU9alxtx4V2EAEp2uEnxlRUQ4uHitw+4kOi4ZuSqH3CUEWXFBHRRyzAJx2E8x8aYl iXRtblF2mxzPW6IOSCskkGOIpS4CB64p0XOHA3/b9VtB2UEMBwRtBBoDDp6Uigun0vGh YShrtkV73hpoONoqPiJn3bVnnU3v3MGS37Q7M/u7GBYhd3jqHAvi+2kZiE1Cb/sovaks b2HQ== 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=2UW4HwN8eDrFtvuvfFqmDWhq1SfFFK+oNhSlXABojNI=; b=mj0eekFZJnuhsP87n5w6VINuhYPF8ZskpbGtZcqXw2SQ7Z39PZPVqFr7mQmvESzhy1 SFq/Vri4rTVnB3woWVS8CsVmX4e8maf8FmETya//aLV2uDPzaqOQ87C5GQMNHIIFTahZ /HW2iglZuhR9f2gudoppxNyVtZrFO6mKHZx1jt2/OQZ9vKmwaEsQEKay4EXU3V9Evo3Q HNhnBq2bxcRER8QXZE962OrLDMiuo5vtd9mAHXXpH+NmfbhH65atJD4LKOUwvirs4ap/ t098F0ypoo0BgLsBmQ3UiZtjDr5qY+AiU/LmR/42uZEjy74isQiVYkqAxpCqWJGiSZUr 7H8w== 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 y26-v6si1473266pfe.269.2018.09.27.02.13.21; Thu, 27 Sep 2018 02:13:36 -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 S1728591AbeI0P3l (ORCPT + 99 others); Thu, 27 Sep 2018 11:29:41 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:55366 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727449AbeI0P3l (ORCPT ); Thu, 27 Sep 2018 11:29:41 -0400 Received: from localhost (ip-213-127-77-73.ip.prioritytelecom.net [213.127.77.73]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 32BBCC19; Thu, 27 Sep 2018 09:12:24 +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 39/88] ALSA: oxfw: fix memory leak of private data Date: Thu, 27 Sep 2018 11:03:20 +0200 Message-Id: <20180927090305.481368482@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 498fe23aad8e3b5a9554f55719c537603b4476ea 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: 6c29230e2a5f ('ALSA: oxfw: 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/oxfw/oxfw.c | 1 + 1 file changed, 1 insertion(+) --- a/sound/firewire/oxfw/oxfw.c +++ b/sound/firewire/oxfw/oxfw.c @@ -130,6 +130,7 @@ static void oxfw_free(struct snd_oxfw *o kfree(oxfw->spec); mutex_destroy(&oxfw->mutex); + kfree(oxfw); } /*