Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1778781imm; Thu, 27 Sep 2018 02:19:16 -0700 (PDT) X-Google-Smtp-Source: ACcGV61SSlTf/nLLcwKEZVZlzTb8w572Au56uokAO7p39+fNqibUYy5qmR6RSlrH+gwU6OTHCdb2 X-Received: by 2002:a17:902:9005:: with SMTP id a5-v6mr7303033plp.86.1538039956829; Thu, 27 Sep 2018 02:19:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538039956; cv=none; d=google.com; s=arc-20160816; b=Fdp04FtmPOP1i0goRTNmcXUkj0QAA9TnVhMxUE0/1oDz4b3b12nNUiMqt7tH3hb2f+ b3Cg7/9cNBQgjeOGJlES58r1CJmvSujz8eCYAh39SjfIJj1aQ6ZEB/yXxaCARCbg0R66 7u+EVBUAvDVLaVfvtI3b3FHI8uKwtg1olvgUDFSIwJpu+Wg6F6b3VzD9XUZerddVl8I0 9RyYVorAr9wF6MGWnM4SLG58fEQnP2Xs6fmd8dx2+/XseRCdXC9dc4/P8tU940xDMVKu fnLqNtvLtkYXiEC1WWEZ/Bqr/nJWL42kb0RmOgWLK5h4+Sf6KyxXdw18LP/e+R2fwObb aqFA== 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=CFOB6Uu4nPiCmakdMpL8lN46DYFhK2vr56pyH6tJSSY=; b=C3UzhgGLwyMCr9uW4gdg49sRqO/G3EKbJnPKs2Ni842nlMMGDDfoA8auqig7O3iIGP TCNraFxMKUXj0Ctkn/YTEdXWliWnh3qmoDn8JfDhesU8UZCJDhoZdJ9DngkGIzq5Zh4C 4rU12yrEy4PvRXt0Do5fOmKdnG/Uxq0Nq1YdD6oWHM0HTUR2IK3vKLY3Uty1ZdktLP6v kvsvxp37/Ocjm6rLWh9rWUNaKZeLVtUlW3UFW+tcKvYh9l635vcO0dIfJmURxavdmESe jZUCgjZWPsUdm7J9k6HNM4gzWSaXkK8TaJ0yMl1OCpfvWQfE2ihcLivBpHkZOcu8SxMF F4MQ== 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 w24-v6si1561422pgi.313.2018.09.27.02.19.01; Thu, 27 Sep 2018 02:19:16 -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 S1728957AbeI0PfZ (ORCPT + 99 others); Thu, 27 Sep 2018 11:35:25 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:56118 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727469AbeI0PfY (ORCPT ); Thu, 27 Sep 2018 11:35:24 -0400 Received: from localhost (ip-213-127-77-73.ip.prioritytelecom.net [213.127.77.73]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 295D81117; Thu, 27 Sep 2018 09:18:05 +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 24/64] ALSA: fireworks: fix memory leak of response buffer at error path Date: Thu, 27 Sep 2018 11:03:41 +0200 Message-Id: <20180927090253.393829302@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 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); }