Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1778941imm; Thu, 27 Sep 2018 02:19:28 -0700 (PDT) X-Google-Smtp-Source: ACcGV60OE06cax74UGtmnHzfGiaD6cGB7FWE9YffncdB71BfnCdvqcMQsXS0SJmJ7ph2pp8mKlo6 X-Received: by 2002:a62:de04:: with SMTP id h4-v6mr10280513pfg.258.1538039968618; Thu, 27 Sep 2018 02:19:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538039968; cv=none; d=google.com; s=arc-20160816; b=a7DaWEZ/cjTvUmELUnlzynu49ILVoahGBmxin7MgCYKtj0o8XIzW70LLYGdmXKUB3t CfLcHXBZGvRzjqPnpW818CUUAUAKYlbrvUZkk/hxlMg60h4dSek/kaM08foWUTReo9VU iuna8wk43gZYOyDCKn092EA/tPm6Geq+y7b7biHpAawqiNBDJ0iz9Tdbq8yjPUDEuQRw /yFRDClVMDbtupG5GB8ZF1rm5sv+smMW7z3vN836zO9qYSbbav97bU0Xu4/1JP6FHZhX GEpBLjuiYi/VOehwoNHLtxA16dp1fmGWhjJQNNmtk0IlzRr60JmD9aWNwZ/gN3FUEaoA 3r2w== 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=dLA4UwPrd9COVkQR+G8E2jpEM0B1HKlri7bEi9dEv0c=; b=asaTmALh1xifpVijplXjslTxlDI+c3zF4yvx9Yk7aG6O8a2f0y3DgxYRZ4twkOs2Xh 5xBSEMOdoPeypW3kSbdiRekRcQ8c8ENHJe3MGOmH5yKk4IiR9Q0Vu+a+NzsDE004wq8f b7uIn03FN68HAV9hd7L9cL4TSGa4ZhBgk4fQ96SitKvl1JDRqprCkWZPsBCOYQUaQm+a 2utACAnSoNyTyxOTGtgcqnocBpY83iMkmVoDqiAXdwWvcYbf8mLTT+4HTG/N3B/rlKtK rcdU4niLvBGNDjoNJchxWmL3OisF4xSiSZbicFEuFELDMYWecWa9hhDg92CGZO1OXlMD Buew== 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 f2-v6si1438593pgh.661.2018.09.27.02.19.13; Thu, 27 Sep 2018 02:19:28 -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 S1728723AbeI0PfN (ORCPT + 99 others); Thu, 27 Sep 2018 11:35:13 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:56100 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727272AbeI0PfM (ORCPT ); Thu, 27 Sep 2018 11:35:12 -0400 Received: from localhost (ip-213-127-77-73.ip.prioritytelecom.net [213.127.77.73]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id E20FA1120; Thu, 27 Sep 2018 09:17:54 +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.14 22/64] ALSA: firewire-digi00x: fix memory leak of private data Date: Thu, 27 Sep 2018 11:03:39 +0200 Message-Id: <20180927090253.094611661@linuxfoundation.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180927090249.801943776@linuxfoundation.org> References: <20180927090249.801943776@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.14-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)