Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp705260pxv; Thu, 15 Jul 2021 14:00:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyvMzbPde7z4epVFAI/1P0ALcqZ6pzWNekLtJRLapktC4qPVHq4SsciPdDF+MKRDtaJXcwO X-Received: by 2002:aa7:c641:: with SMTP id z1mr392123edr.289.1626382835573; Thu, 15 Jul 2021 14:00:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626382835; cv=none; d=google.com; s=arc-20160816; b=qoM1+VGB6czRZ5rG3TQ/EQHzuq3FojlAmcEFpZTKJK7nElhtcmAxKBWTuhDZig9qs2 shHCHYZfa/vHERIYV9jiGN1Pa6ljnp7qZRTYoE+fRE7gHInG3Cm9WkgPwDR5sdeSJd7a xHuLhsP8FVsKt1A3rSY6IRZvnm60WW6tshx/ppFD0tXbGXnWeMdANTrVodndbKMkNiH2 uGVrKHA1HK7dL5LF+lR/SjAr8FScpXe0v83cwxuKo3qqiYmgO5DKed23BID3rBW1Zixk ULOVPZLeX54WTrG/tzrKJsxFtjTS7ZTkrzqghCZm9Fk/dCskmVDwYztyx11F6JwWhgiO nb2g== 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=oPqoI64FABaKjdFYPgM6tAP/Q30NeajCJabF0tjvs5g=; b=TN4hUsAoFSQ+BF/IZ7V24fKnJQt60kcRsF4nlNlch5aV1pusyWMyWpnqGAAjP2hmjQ mcC9w3avbcIK1opXoZKKcwIGmvSQ+zvta0ARJPRSy5z2k5Vf+wQW0b//AWOmT5ghMOpK phEu5Ui+Py5vk6KDpBBNkIFlCWDDYwJk+omOeRAubtEEto2VLfwF30CRJ/QslURPXTNr Y9O+OFJzDK+5Bzj4TPrk3E1SH4ZJyBeb+T8Rgcr3+itUOmILO83bkrsTb18SDOeHAL3F EEGk0lR7jAQqq4ddOM3xTdKPoG5THOh9hVlZOM+rhjOyCs/39gwcFMSiaENrdbSCb2DK XT5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=qNvFIlte; 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 m2si8985505eds.563.2021.07.15.14.00.11; Thu, 15 Jul 2021 14:00:35 -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=qNvFIlte; 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 S232492AbhGOQKa (ORCPT + 99 others); Thu, 15 Jul 2021 12:10:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47032 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231634AbhGOQK1 (ORCPT ); Thu, 15 Jul 2021 12:10:27 -0400 Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6D29CC06175F; Thu, 15 Jul 2021 09:07:33 -0700 (PDT) Received: by mail-wr1-x434.google.com with SMTP id k4so8452227wrc.8; Thu, 15 Jul 2021 09:07:33 -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=oPqoI64FABaKjdFYPgM6tAP/Q30NeajCJabF0tjvs5g=; b=qNvFIltehBU52bCKU/WYyAvG+ZAoXCWbSW/6LuzAdCkLuUI+AXjwCdeq0W2Sq+gUWp huQnyKB31Qnh3DHyfkMnGhu9T/18eMjLW/poRBod9q6SknNBipbR4dYKLMfNMx2lkl/a b/yMvesZFg72XVVGmVgvN62bZ/NIGwqihjb4bWlhmQK32dZMTbS7xOrys8ruMVRdi2WO Z9DwPjAIuBcqfxQiF31qpOpJXtSaTvWAt3dKvEAayogAJhBcHk4/IGvc/lVSTlCa5jUk g0UA+YDzNWwt//gUZRAo71Sq2dHG4e8cmZnsjJO89meaEaBoCwEWhxWOtXsy2SJ5SZFn 5RTg== 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=oPqoI64FABaKjdFYPgM6tAP/Q30NeajCJabF0tjvs5g=; b=VAJKlvFxTa/XLFXNWTSjKMAdMNMplJqil0b22RenKNc4+FX/wSaaUh3PqZX31p+QmX iTaGD+WXmaI5PSTN0zQkSv7srcpFLwexFPXL7eWV5pbr34oZg/aWvrS8x2vJbcP7+vug dbguM8PhwtYROQx08tEmbsc4ze2nuCFeOxzl0xeCjJLF344g2CcIdUxJBofIKt2q/Ea4 h4Txs1uVU6kP4wURIOx0qCRmFIxwyzQ/tSaHQ78bEleEITF8tiguA3GG8NF2+Z/vY3dW NdjOA4RcohRzvezi6xkQkucY8XU7LjPDk2BTvr1SY3pL7t3T6DYD3KKbLztj6LIEOLJB czGA== X-Gm-Message-State: AOAM5331PJ8lpxGZkeVMt5CYR94d2hTlgJGN5cHs6DVJiV6IuxbB/Et6 E2awpeC4SLFatNyuYRigPLs= X-Received: by 2002:adf:fcd0:: with SMTP id f16mr6699881wrs.368.1626365251980; Thu, 15 Jul 2021 09:07:31 -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.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Jul 2021 09:07:31 -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 04/20] perf test: event_update: fix memory leak of evlist Date: Thu, 15 Jul 2021 18:07:09 +0200 Message-Id: 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 when running the perf test "49: Synthesize attr update" caused by evlist not being deleted. This patch adds the missing evlist__delete and removes the perf_cpu_map__put since it's already being deleted by evlist__delete. Signed-off-by: Riccardo Mancini --- tools/perf/tests/event_update.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/tests/event_update.c b/tools/perf/tests/event_update.c index 656218179222cc58..932ab0740d11ced6 100644 --- a/tools/perf/tests/event_update.c +++ b/tools/perf/tests/event_update.c @@ -118,6 +118,6 @@ int test__event_update(struct test *test __maybe_unused, int subtest __maybe_unu TEST_ASSERT_VAL("failed to synthesize attr update cpus", !perf_event__synthesize_event_update_cpus(&tmp.tool, evsel, process_event_cpus)); - perf_cpu_map__put(evsel->core.own_cpus); + evlist__delete(evlist); return 0; } -- 2.31.1