From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6E521C6FD20 for ; Tue, 7 Mar 2023 17:18:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230525AbjCGRS1 (ORCPT ); Tue, 7 Mar 2023 12:18:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37818 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229960AbjCGRSD (ORCPT ); Tue, 7 Mar 2023 12:18:03 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2DFE192BDE for ; Tue, 7 Mar 2023 09:13:41 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 723BC614E8 for ; Tue, 7 Mar 2023 17:13:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6A1EDC433EF; Tue, 7 Mar 2023 17:13:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1678209219; bh=ZMV5ewxCC6Jv+E5rwhMVjgklerIpcoaWkoCMGtCtBas=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HPlLGvwX7fZkLIWnvctjoexT4OzdOULZJ/Woq3sjbnWQCN1Ty+hknQJ/t/IZxTC75 8PiMpvCsZca/dCNlmXZGaO+RmkYGr8metzQbHfmFCZkeq5L+m9CT0n8Bf3cdbGQG1p HL97OUxyQyqnMtbOI+XpjTlGkC5rbLujOJDilPGw= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Yuan Can , Simon Horman , Kalle Valo , Sasha Levin Subject: [PATCH 6.2 0148/1001] wifi: rsi: Fix memory leak in rsi_coex_attach() Date: Tue, 7 Mar 2023 17:48:40 +0100 Message-Id: <20230307170028.472189773@linuxfoundation.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230307170022.094103862@linuxfoundation.org> References: <20230307170022.094103862@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Yuan Can [ Upstream commit 956fb851a6e19da5ab491e19c1bc323bb2c2cf6f ] The coex_cb needs to be freed when rsi_create_kthread() failed in rsi_coex_attach(). Fixes: 2108df3c4b18 ("rsi: add coex support") Signed-off-by: Yuan Can Reviewed-by: Simon Horman Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221205061441.114632-1-yuancan@huawei.com Signed-off-by: Sasha Levin --- drivers/net/wireless/rsi/rsi_91x_coex.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/wireless/rsi/rsi_91x_coex.c b/drivers/net/wireless/rsi/rsi_91x_coex.c index 8a3d86897ea8e..45ac9371f2621 100644 --- a/drivers/net/wireless/rsi/rsi_91x_coex.c +++ b/drivers/net/wireless/rsi/rsi_91x_coex.c @@ -160,6 +160,7 @@ int rsi_coex_attach(struct rsi_common *common) rsi_coex_scheduler_thread, "Coex-Tx-Thread")) { rsi_dbg(ERR_ZONE, "%s: Unable to init tx thrd\n", __func__); + kfree(coex_cb); return -EINVAL; } return 0; -- 2.39.2