Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1775608imm; Thu, 27 Sep 2018 02:15:38 -0700 (PDT) X-Google-Smtp-Source: ACcGV60w2lbGg3cH4KE4DW+jbZmuYS3uQLGimw3R1lGMvP8grvPt8y3exJC36RDruhuB/w/tijKX X-Received: by 2002:a62:d286:: with SMTP id c128-v6mr9074058pfg.14.1538039738442; Thu, 27 Sep 2018 02:15:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538039738; cv=none; d=google.com; s=arc-20160816; b=YPWjz4/s1CSgZHSECPdU1/iVSCGd/Md92QFTREvwnKSnrteI/5bsOgOKl3hLshFLvk sAhL1ajOEgvMH6E4BRX8pJFgV17i/AlJUOEhMlR5KJysQ0jJ/2QjP3kyjCrY+M3PG/LJ IXC5aprvrsEMmnKTaCM0Dg5QudvQfj78iahOoJ4tPtBb3pr9HOBf/RCtQDaROrBCBIDU ar/QVbAYx/tf6sHSvJfB9ewNvNTkgaKW0xHMYyKiEnQPZmzrMzh6aJlwQN5RYetezTiy 4mffDpL36aVn87gj1rbwU4P2GHfwMztEifSmyvZAcIDatmeJzARyDLCDh6DziTRdI3tM vJ7g== 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=waIf2lUkRpBeIlYO16bimEHBdzWe6z3ZVLitN9Gpo8k=; b=X7gIxJ21rfRqs90J4Wc6MAFIY8jo9LtmzgniX6qnG7CoTrYLnDO52bDer7U0aGhzZ8 uUglJN/JrYL+CDagZvqCfHJt2xaj+JD7FDqhft2NQlq8pIOuXwxYDV2RdEGY8E0PYyTx U0vJQ7VICTqCiwkPew8YsUEPQcIwAxg2tVVkQRXnfdT4GbNR7yj46uZAGmq64G8gnnLr MUfTAudXUMXt+TWWIBxWY5wFYseQb6QKAMFvgCuGcrEXQMARIkG+Va5/3hq3hra2eUmQ Vs38b1mxSfhAVCyZ5o9Oc0Q8kOBdNRnOPxbjMgcmj4iCbvR4hd65/8B2Kbd1xvnthpai erAQ== 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 p66-v6si1591760pfp.237.2018.09.27.02.15.23; Thu, 27 Sep 2018 02:15:38 -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 S1728512AbeI0Pac (ORCPT + 99 others); Thu, 27 Sep 2018 11:30:32 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:55436 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727613AbeI0Pab (ORCPT ); Thu, 27 Sep 2018 11:30:31 -0400 Received: from localhost (ip-213-127-77-73.ip.prioritytelecom.net [213.127.77.73]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 0A1011120; Thu, 27 Sep 2018 09:13:14 +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 36/88] ALSA: fireworks: fix memory leak of response buffer at error path Date: Thu, 27 Sep 2018 11:03:17 +0200 Message-Id: <20180927090304.936894240@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 c3b55e2ec9c76e7a0de2a0b1dc851fdc9440385b upstream. After allocating memory object for response buffer, ALSA fireworks driver has leak of the memory object at error path. This commit releases the object at the error path. Fixes: 7d3c1d5901aa('ALSA: fireworks: 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/fireworks/fireworks.c | 2 ++ 1 file changed, 2 insertions(+) --- a/sound/firewire/fireworks/fireworks.c +++ b/sound/firewire/fireworks/fireworks.c @@ -301,6 +301,8 @@ error: snd_efw_transaction_remove_instance(efw); snd_efw_stream_destroy_duplex(efw); snd_card_free(efw->card); + kfree(efw->resp_buf); + efw->resp_buf = NULL; dev_info(&efw->unit->device, "Sound card registration failed: %d\n", err); }