Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp666478pxv; Thu, 15 Jul 2021 12:56:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwP/4Ch49bkWYoFpjt1ILx/2AYfOvpLavEndc3W7HkdYFG/U46TWC3RqbIbi+rZqEKIgwrO X-Received: by 2002:a17:907:a04e:: with SMTP id gz14mr7359915ejc.24.1626378986868; Thu, 15 Jul 2021 12:56:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626378986; cv=none; d=google.com; s=arc-20160816; b=Sogie4HVH8ZuONNwxEAWajwtj+LABbdOXttCsymO8GFSuzyoicKJ5NCgYcGU5UpwK3 ilcrqWbf0+ntk2aR7B03R3yjs0WqOdNyfs+9ySFLDyXxksWYZjm2EqXTG3eIW6+r8aBo OTfB7yjGqO7UHtdVVjZeB+NDsdnVia5H7avJY4yyPlWhgEqyAJPo6DoSIQCyaqBSDCTC kt5MJLfKgBpFvRCCGBktC/qiRXH7LkugQScQBbqr5U64srDUj/IjSe43S2XmKZh5w6Wy kVqA7tXx72NtLMF8jElwclsdTXPv+WgI9kJ7TEig1RE3GeN5a3WhczJtvNnYw6QFIPON nA+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Dofg/kZQY0t0cz0KT8mI8z9FEYLUPvIIpt/rhAOvwc0=; b=oqR0+7op0kRXDAHsb9oFWVWhVLN54hjX5On49Ee1cMSHx21qeEkDA2kcqn0FnEfdLI vT68OsFZONa+wwtinT0RwyN0i9PfeFFiriXsQ//ndbd16cm30nHCfjjQdjPH88kQmaCN O+vrze9FMTiN4ARtNZMcB73lWyLX1VoFNQMGAftRwOzP0kl3a94PSwftVhpZwzLjssCX bA5jej8od7zFaJTgOCXhBX5kK62sRCm/YzfNWsx3+b7suri+/BJq6G30pfNYfI8ExoFl KfbC0hLcrYppqHd+UZ0XJXYZUpy8L/x5qJw53fP1orlmCy1CBEIwd7SXEECDBrxJWdc9 PTIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="lWI4/Vjd"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m7si8543571edq.604.2021.07.15.12.56.04; Thu, 15 Jul 2021 12:56:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="lWI4/Vjd"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242874AbhGOT6B (ORCPT + 99 others); Thu, 15 Jul 2021 15:58:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:45794 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345576AbhGOTyy (ORCPT ); Thu, 15 Jul 2021 15:54:54 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 18E9A61073; Thu, 15 Jul 2021 19:52:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1626378721; bh=XBqQm/qyQmEIVPgYlJirxh3AhpJzp/fXOspqXaszJhQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=lWI4/VjdPWxyaFNDCvqb4MfF2OS84B/SJBa/xK4iSBX/iFYjosXhjhcDhxcftnLen VrT22NbJLEkf/GvaAvH7Uo1vvQPx85WmWwAX7Y4Wehgsba+aqfPQ1EwMOnjhkyEmLw XX3zGL4VvpUW/IegsjTAhqEM/17UZ+4F86s4dJ91p+94vPeqo4HWwbFG6+/osO/y5b vIPoWbEK0a6vbSeKp43lap1JDQ/j1r6067eAfMhQxj91l7f+E25k0Z1IDD5+DqQZc2 GGmWRMo1giNIR8NPbEQKbB/RWrMWnCRgKoMIdj/D4VriDm5yANmFUjQ1oUpGyuXDbr ITF19iKvSQygA== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 96B4D403F2; Thu, 15 Jul 2021 16:51:58 -0300 (-03) Date: Thu, 15 Jul 2021 16:51:58 -0300 From: Arnaldo Carvalho de Melo To: Riccardo Mancini Cc: Kan Liang , Ian Rogers , Namhyung Kim , Peter Zijlstra , Ingo Molnar , Mark Rutland , Jiri Olsa , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org Subject: Re: [PATCH 03/20] perf test: session_topology: delete session->evlist Message-ID: References: <822f741f06eb25250fb60686cf30a35f447e9e91.1626343282.git.rickyman7@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <822f741f06eb25250fb60686cf30a35f447e9e91.1626343282.git.rickyman7@gmail.com> X-Url: http://acmel.wordpress.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Thu, Jul 15, 2021 at 06:07:08PM +0200, Riccardo Mancini escreveu: > ASan reports a memory leak related to session->evlist while running > the perf test "41: Session topology". > > When perf_data is in write mode, session->evlist is owned by the > caller, which should also take care of deleting it. > > This patch adds the missing evlist__delete. Thanks, applied. - Arnaldo > Signed-off-by: Riccardo Mancini > --- > tools/perf/tests/topology.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/tools/perf/tests/topology.c b/tools/perf/tests/topology.c > index ec4e3b21b8311f57..b5efe675b321746e 100644 > --- a/tools/perf/tests/topology.c > +++ b/tools/perf/tests/topology.c > @@ -61,6 +61,7 @@ static int session_write_header(char *path) > TEST_ASSERT_VAL("failed to write header", > !perf_session__write_header(session, session->evlist, data.file.fd, true)); > > + evlist__delete(session->evlist); > perf_session__delete(session); > > return 0; > -- > 2.31.1 > -- - Arnaldo