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 smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 10754C352A1 for ; Wed, 7 Dec 2022 09:15:56 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 90CBA408E8; Wed, 7 Dec 2022 09:15:56 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 90CBA408E8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1670404556; bh=SYRl/cCdSUnHF9BK0ZUvXcejp+y8++UVGl97s3hPlyI=; h=Date:From:To:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=hZyhXjDLDeONl1PXu+A/odV9wlxS9iNVLkumOV7O/o0ceT+vUV69IgXmVVLXq8ao1 x0N6oS4uOb/RYSt7QC5u1si0l3/5aHGDjxFY9Ayjhb7N5Q32lJKLLc7qPHVTt07Opn 1RwaZhKyiArBfRb+kr+ldOPLZ6pWasp9RFmd4xxNFZBAeVmt5G0r8daQQ4MblwetKt HeTXa0jKV9BF3dMRu2NuR3Nqrk6mJZJHWisk2qjZTABSIKknTl3sC5jn02BLTjj1RM osS0Q/MIRrFpHrV3B+WTlwIhOuOfGG2dUz1hgsitDEbgOePS7fL/kR8B0tmbA6SLWu qg0iXRZSF/v4A== X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CIV_CBNOB19R; Wed, 7 Dec 2022 09:15:55 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp4.osuosl.org (Postfix) with ESMTP id 7F87B4176B; Wed, 7 Dec 2022 09:15:55 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 7F87B4176B Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 22A441BF327 for ; Wed, 7 Dec 2022 09:15:53 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id F0E7840608 for ; Wed, 7 Dec 2022 09:15:52 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org F0E7840608 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Ta31N-xHXFSa for ; Wed, 7 Dec 2022 09:15:52 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 65B46405EC Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by smtp2.osuosl.org (Postfix) with ESMTPS id 65B46405EC for ; Wed, 7 Dec 2022 09:15:52 +0000 (UTC) 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 4D4A460C50; Wed, 7 Dec 2022 09:15:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 306DAC433D6; Wed, 7 Dec 2022 09:15:49 +0000 (UTC) Date: Wed, 7 Dec 2022 11:15:46 +0200 From: Leon Romanovsky To: Yuan Can Message-ID: References: <20221207085502.124810-1-yuancan@huawei.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20221207085502.124810-1-yuancan@huawei.com> X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670404550; bh=tiCuLh7ePXtppm4S+qJKNHvU9LhjpIATWhzzO5cPyBY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=LEjqXpEUHXluvV5T7OLvwgsMDjvGcyJllfUT5dlW/dj0aeS44TA2kbZIoO4PDP0Sj S4om1ac9Ox7R56/56voZwJDJYw4wNT3laYn8odk4W+vkX+UVtw2dqBUJjXSbNcJAS4 n82lS0cN1Upmip0720rKxzW2Vl9OASCP3h+Wqkl2ezxvNbYS+N/IBGN0WWo5woDKZ6 0HqC6yu1RAnIPMyhZ9vTH9o5bDnhcsnDwzONQYw/GNWINFHr9SDX2TRwFRXP/oNpP4 r90rCUK7GWwf+P3/xPP5eLr5/7sloBmnCKfHfcTyKTxUR8YqOglOYrKZ9MdJoKYPRc 3j3tLIgqAFskQ== X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=LEjqXpEU Subject: Re: [Intel-wired-lan] [PATCH net] ice: Fix potential memory leak in ice_gnss_tty_write() X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: karol.kolacinski@intel.com, intel-wired-lan@lists.osuosl.org, jesse.brandeburg@intel.com, edumazet@google.com, anthony.l.nguyen@intel.com, netdev@vger.kernel.org, kuba@kernel.org, pabeni@redhat.com, davem@davemloft.net Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" On Wed, Dec 07, 2022 at 08:55:02AM +0000, Yuan Can wrote: > The ice_gnss_tty_write() return directly if the write_buf alloc failed, > leaking the cmd_buf. > > Fix by free cmd_buf if write_buf alloc failed. > > Fixes: d6b98c8d242a ("ice: add write functionality for GNSS TTY") > Signed-off-by: Yuan Can > --- > drivers/net/ethernet/intel/ice/ice_gnss.c | 1 + > 1 file changed, 1 insertion(+) > Thanks, Reviewed-by: Leon Romanovsky _______________________________________________ Intel-wired-lan mailing list Intel-wired-lan@osuosl.org https://lists.osuosl.org/mailman/listinfo/intel-wired-lan