Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp3687317ybb; Tue, 31 Mar 2020 10:00:20 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvJcL2xXYEnJTdpvnncUFkXmG+MAsM18fsOghmrUieygT5CpgiBb1OVz9ZsLL5iXgoWTvpy X-Received: by 2002:a05:6830:1ad0:: with SMTP id r16mr13989767otc.183.1585674020486; Tue, 31 Mar 2020 10:00:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585674020; cv=none; d=google.com; s=arc-20160816; b=GwtbJkq5l830omhQtMhqNt3+7+mNwiIYYodbyNvZg9mwvkY+S1YpVq71aSCZwkp+R9 r+qFgySkndff0LrFR+Yzxz51ZyawARhnKLlSAAGQTVGDIKl/ENpGFcqGIpBligDVIh36 zYaucYZeeftwx+xE4b0gyDMXqXhmWh0m3t7hop0yzSYwFajc4gDyR3Lw3qDezTaQc+2u cqbogOuC5ppTvyy7hHjGVsiTe9dJHhh1nwcd7+nHOnOp8AburQQTIprEF8JLI3Gz8k4+ aVa+RBUCNzZAga+BzPIYpTkLiCNRepfC0jHDmaSdvNm769wu8ob3k5iwCqhfzl1WvSnT hUHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :dlp-reaction:dlp-version:dlp-product:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:ironport-sdr:ironport-sdr; bh=6uvgmjN0qxhlEHK+HmJEY2p7bx/bE/ZzE0RIFU+y720=; b=BTpDQQdJqW8tM3aB96dt5Z3KklZt7tZqmiOLaX4HMIYTzxHNp5Iy5dTp29ZGKdl0b0 bve957ZeNETx6lHA2UE7xOyqtrRXwYIlhUNmqHT3B4G6DNhMGbTDF7fe1SFpO21IKwOl 91SyXfcqUZyWsAjHuwYkIuwl7S7GOveUNqyOViBvI+H8GoOkM0D80xWWaAvvAmav6rvZ NUPU/aTu7kP5NnO0WRuo4iatmHGVtBj17kTfi6pnWOxrWEt4fYpeU+h6pUxC9lWhpPCD 7/bDxDaZdKFbVIuyFCOPVf498BHZEPIVONoEHLBptIuzSKEV08Jr/heDDI+9Mb8NU1FU +nJg== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i21si7782332otc.183.2020.03.31.10.00.05; Tue, 31 Mar 2020 10:00:20 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730672AbgCaQ7F convert rfc822-to-8bit (ORCPT + 99 others); Tue, 31 Mar 2020 12:59:05 -0400 Received: from mga17.intel.com ([192.55.52.151]:40607 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730099AbgCaQ7F (ORCPT ); Tue, 31 Mar 2020 12:59:05 -0400 IronPort-SDR: NR3ohADNYrgM8LMxAUPO6uiMThMTeFdAuf0tTFMX0LyUkpPpVI4MmOeMfvpwHoIp8iKy6XEkv2 4RPTIhk3XrXg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Mar 2020 09:59:04 -0700 IronPort-SDR: QNddGzEaR41Pk1kARx6T6NkTrtuIMdCBDVlORF3OqMAFpD3VKw819q8WU+hSRa2fE/WlJ3rpus Ju9dX72Xz4cA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,328,1580803200"; d="scan'208";a="359559293" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by fmsmga001.fm.intel.com with ESMTP; 31 Mar 2020 09:59:03 -0700 Received: from fmsmsx126.amr.corp.intel.com (10.18.125.43) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 31 Mar 2020 09:59:03 -0700 Received: from fmsmsx101.amr.corp.intel.com ([169.254.1.121]) by FMSMSX126.amr.corp.intel.com ([169.254.1.221]) with mapi id 14.03.0439.000; Tue, 31 Mar 2020 09:59:03 -0700 From: "Keller, Jacob E" To: "Gustavo A. R. Silva" , Jakub Kicinski , "David S. Miller" , Jiri Pirko CC: "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH net-next] netdevsim: dev: Fix memory leak in nsim_dev_take_snapshot_write Thread-Topic: [PATCH net-next] netdevsim: dev: Fix memory leak in nsim_dev_take_snapshot_write Thread-Index: AQHWBurBnbLOF3VzoE2u5DvbpZ6iMKhi7WBA Date: Tue, 31 Mar 2020 16:59:02 +0000 Message-ID: <02874ECE860811409154E81DA85FBB58B6CABF0F@fmsmsx101.amr.corp.intel.com> References: <20200330232702.GA3212@embeddedor.com> In-Reply-To: <20200330232702.GA3212@embeddedor.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.1.200.106] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > -----Original Message----- > From: Gustavo A. R. Silva > Sent: Monday, March 30, 2020 4:27 PM > To: Jakub Kicinski ; David S. Miller ; > Keller, Jacob E ; Jiri Pirko > Cc: netdev@vger.kernel.org; linux-kernel@vger.kernel.org; Gustavo A. R. Silva > > Subject: [PATCH net-next] netdevsim: dev: Fix memory leak in > nsim_dev_take_snapshot_write > > In case memory resources for dummy_data were allocated, release them > before return. > > Addresses-Coverity-ID: 1491997 ("Resource leak") > Fixes: 7ef19d3b1d5e ("devlink: report error once U32_MAX snapshot ids have > been used") > Signed-off-by: Gustavo A. R. Silva > --- Ahh! Thanks! Belated Reviewed-by: Jacob Keller