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 smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (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 59C7FC54EBD for ; Fri, 13 Jan 2023 06:19:55 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id CCBA460F1C; Fri, 13 Jan 2023 06:19:54 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org CCBA460F1C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1673590794; bh=WFprSRajriF4XQVgqpZsm6201EmvVXzlRq7Ic10njFg=; h=Date:From:To:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=bMhD38wCX1og8gQobr4tYzW6f0UPPdwnld/C+0gcQKr3hFvBA5y52/v78yw4l/pKL kqJlIz3DoL0I2CvY1CHEOo9t6t6dhsLDOFj7Ar8XwKUKaN/MdfHmcKFv1vY8XA0C8V 6LYC+JGQf0ToC2YKzrZtAbL90isSH2/Q3r1qE/gosc/LE9/XWPSsnu7W/Fm0DkkoPW tEmeBCmIpqr5XbGA01PBl4DC9mLn9OgVXwQdfr2PiUO3s88XPFTS0rdrBf70YWB/A9 QXHkbah6OKOQdBEKjir40ye9KiGkd9w+UTGTy4MHkFqY4RZq1nW6iuLtnRVF77AAY0 TIYbEuWsXOsoQ== X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id B7slSdK6p7kU; Fri, 13 Jan 2023 06:19:54 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id E350160F32; Fri, 13 Jan 2023 06:19:53 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org E350160F32 Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 50BF11BF83B for ; Fri, 13 Jan 2023 06:19:52 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 366CD417B9 for ; Fri, 13 Jan 2023 06:19:52 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 366CD417B9 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 YZPvL0cmCLZa for ; Fri, 13 Jan 2023 06:19:51 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 36FF7416E5 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by smtp4.osuosl.org (Postfix) with ESMTPS id 36FF7416E5 for ; Fri, 13 Jan 2023 06:19:51 +0000 (UTC) X-IronPort-AV: E=McAfee;i="6500,9779,10588"; a="351160522" X-IronPort-AV: E=Sophos;i="5.97,213,1669104000"; d="scan'208";a="351160522" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jan 2023 22:19:50 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10588"; a="608061543" X-IronPort-AV: E=Sophos;i="5.97,213,1669104000"; d="scan'208";a="608061543" Received: from unknown (HELO localhost.localdomain) ([10.237.112.144]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jan 2023 22:19:48 -0800 Date: Fri, 13 Jan 2023 07:19:44 +0100 From: Michal Swiatkowski To: "Ertman, David M" Message-ID: References: <20230111103630.17629-1-michal.swiatkowski@linux.intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1673590791; x=1705126791; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=L9hJQOQcYcmoOFkCFzOlTEeTJXCsMtmBZUHCd1G/Xoc=; b=LD3zeX/MNw7tO2W8P/+YphsI1SoC7ibotitLQFmpNIDRNsqueikEN6lD S39fRs+je3hVuQbFVWF/19JDXtb/GN3IdTdVDBfcGL5WdhB7T6SSi1SaL CFs89HlM6ESDmb2K80oQ0F9y6hlAVO/ctplD6coBf2okRPcASPUw+PIqC UJ2BoXVs93ZDKHnCY0C4L43rGGBStkz3z2Q04o2thvq3a3NzJicpyuUc1 wWQMdGDBZiVZXCMBQRbI+xI89sOnUqBTdFsGoMl3XofsW+5+bLEabPJ48 AxlUsPlbydXz1z3EJyK+lJN8JyeD6VyVUfV4tUoaSPH6LKO8xfypLfwW9 A==; X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=LD3zeX/M Subject: Re: [Intel-wired-lan] [PATCH] ice: memory leak in ice_vsi_alloc_stat_arrays 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: "Nguyen, Anthony L" , "intel-wired-lan@lists.osuosl.org" , "error27@gmail.com" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" On Thu, Jan 12, 2023 at 05:38:29PM +0000, Ertman, David M wrote: > > -----Original Message----- > > From: Ertman, David M > > Sent: Thursday, January 12, 2023 9:03 AM > > To: Michal Swiatkowski ; intel-wired- > > lan@lists.osuosl.org > > Cc: Nguyen, Anthony L ; error27@gmail.com > > Subject: RE: [Intel-wired-lan] [PATCH] ice: memory leak in > > ice_vsi_alloc_stat_arrays > > > > > -----Original Message----- > > > From: Intel-wired-lan On Behalf Of > > > Michal Swiatkowski > > > Sent: Wednesday, January 11, 2023 2:37 AM > > > To: intel-wired-lan@lists.osuosl.org > > > Cc: Nguyen, Anthony L ; > > error27@gmail.com > > > Subject: [Intel-wired-lan] [PATCH] ice: memory leak in > > > ice_vsi_alloc_stat_arrays > > > > > > Fix memory leak by checking if stats were already allocated before > > > allocating new one. > > > > > > Previously it was completely broken, because new allocated value was > > > checked instead of previous one. > > > > > > Reported-by: kernel test robot > > > Reported-by: Dan Carpenter > > > Signed-off-by: Michal Swiatkowski > > > --- > > > Should be squashed with commit eace2cbe7f5f > > > ("ice: split ice_vsi_setup into smaller functions") > > > --- > > > drivers/net/ethernet/intel/ice/ice_lib.c | 8 ++++---- > > > 1 file changed, 4 insertions(+), 4 deletions(-) > > > > > > > Thanks for catching this! > > > > Reviewed-by: Dave Ertman > > Please clean-up variable ret, since it is not needed any more. Also can probably clean up braces that won't be > needed any more also. > Done, thanks > DaveE _______________________________________________ Intel-wired-lan mailing list Intel-wired-lan@osuosl.org https://lists.osuosl.org/mailman/listinfo/intel-wired-lan