Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp544750pxv; Thu, 15 Jul 2021 09:55:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwlgOy9UdFaEeXGvtvn0aBJ4eW3tCYoNK/6qpZh4+llNNgyNUsivLfnXXAa/pwayWEp6a5e X-Received: by 2002:aa7:cd73:: with SMTP id ca19mr8331904edb.117.1626368142835; Thu, 15 Jul 2021 09:55:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626368142; cv=none; d=google.com; s=arc-20160816; b=RDn/2CQqgfe4/FrnPZa02asG/ZR8ahs9xYs/q8SSKLoIoa2HCc/TySz5oduWzVG3IW aDyRqf1UDuCDheBSnFsZCy954B/MONLjvhqOH7rA0ZNyQdjdmh2//y/t0Lb3r/Mp3y3u jeTYnOZUTB/F4Czzpi7Ti90p7Ocyf7DOB1RAaYKT3oOGFQP+c+o3yaOjOg0q5L5Y8dbA V9KNBvOwFRX+JcGsmrzg8APgiHSQmlvNnG4/zDCv+W6EBpDDyFpU10AYamB/ZN5RKUMk X7kQAJwMzkcbIUGrcEqQQ2cbMyw+eaZXtvL+UcmGmPRZfjmb3oAZgCVQVlQvUwwvpgD6 bbGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=CSHeuwUTA30JHyvgWYegQDxbsMpdusH7A0XgD14xaKY=; b=UbbZxiuX08/3A0b1cfTzs0L5BoQF2+xrmnYop0XD39kDnacj5Nl2xvmJujW8C6f80y WanKBlKvoj+SuAroB485gFezyx0bLMecXZgHmaESGNHOpuLLAvH6iFG8CodeIG0qk+ts GBWRecKE15cM3rad1pQZPQqAqlLC7kJmSq2gVWcQvxe06jvkjzLhjRiQBoKFC8eUfl1/ XL18PEOzV42a4qGs6KUNcZyiBPVPBlRflzDg9RC0V5BSG3W58UJ9to2gfA4RxkqckV5K +q48Ov18cxIe7DEZqJg9GwEWI6NYwcPHZy+5M/K+cxFzyyJGen0R1aSDpqlGg4Jezd8T uKxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=udfSn2Ao; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ji4si341860ejc.469.2021.07.15.09.55.20; Thu, 15 Jul 2021 09:55:42 -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=@gmail.com header.s=20161025 header.b=udfSn2Ao; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231865AbhGOQK2 (ORCPT + 99 others); Thu, 15 Jul 2021 12:10:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47028 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229531AbhGOQKZ (ORCPT ); Thu, 15 Jul 2021 12:10:25 -0400 Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 36FC2C061760; Thu, 15 Jul 2021 09:07:32 -0700 (PDT) Received: by mail-wr1-x435.google.com with SMTP id f9so8447276wrq.11; Thu, 15 Jul 2021 09:07:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=CSHeuwUTA30JHyvgWYegQDxbsMpdusH7A0XgD14xaKY=; b=udfSn2Ao6cSs7/lr1z+u1GZEnCaa/p6EBue5sfEjqFBwnFdDOkkMtd3jX8tmlwN0nI PaU6LBdkL3fVa9QHsO71H1p/kxu5PkAsORk1V5uCJUSa2vHfMnmGBjMV//W0dzAeYuQE mQs7oofqugBPeFOqeEClNygq3dPAUAiAR3om0XV/fl57z6lOWUGTlVrKMjdGxwJRDjV7 fIoRj7XpsI+DB6QhX34cZaqgMgGgvOro7htsPI1DHAjkTRXf2CG4FvdED1r9im+W4GJ/ BCdcCEaTvfxaaZATnsBs71ZuKs4Sluh/Z3ZH6UVM9LqTJR3pKA2XlnFjXDyTs7J6hH8T ky6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=CSHeuwUTA30JHyvgWYegQDxbsMpdusH7A0XgD14xaKY=; b=aZFemu30fejxJoejHvOOb52XmkspbB5W/XGSQp9/YgNkd+Fnzf1AMT+jlF8ZoJ9hcq +v+NNX7bcdTF/XfQZyP06DDW4A8oyHHNkc7R2HFtWooTmbIEsPPLQzvVpK4nJWCSVi5f qsgeuFu7KmLjwNWKpKRAw3JFeudCH1HNMcNA+M8ssNalUl6u7paCpvrDwIEhOSv14PpK saWKdHY6SI6DBERmODK10o4n9UfvjdPLkQ0Bd6ZfvRVThlmrtQ2iIN5zJzRxzO8B3gAM FUlCZVyHyE+OmqyDw6hsklvAy+tB8M2eBYejxfXyxxN5xECLxrnya1xh1r/naiZGzIFs BFUg== X-Gm-Message-State: AOAM5312MO4lmQE42z6FEq9Ht5FoOgcOwUwsA+fh690oglgi1dhkRCw5 7khJaoYgQ4xUnRWMNJeDmwI= X-Received: by 2002:adf:eb82:: with SMTP id t2mr6513951wrn.337.1626365250797; Thu, 15 Jul 2021 09:07:30 -0700 (PDT) Received: from honeypot.lan ([2001:b07:6456:fd99:ced0:db1c:53e1:191e]) by smtp.googlemail.com with ESMTPSA id k13sm7446952wrp.34.2021.07.15.09.07.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Jul 2021 09:07:30 -0700 (PDT) From: Riccardo Mancini To: Arnaldo Carvalho de Melo Cc: Ian Rogers , Namhyung Kim , Peter Zijlstra , Ingo Molnar , Mark Rutland , Jiri Olsa , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Riccardo Mancini Subject: [PATCH 03/20] perf test: session_topology: delete session->evlist Date: Thu, 15 Jul 2021 18:07:08 +0200 Message-Id: <822f741f06eb25250fb60686cf30a35f447e9e91.1626343282.git.rickyman7@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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