Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp601042pxv; Thu, 15 Jul 2021 11:13:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyOT3qfeW0reuRA33NzEecsmpXLYYHyDi2euYgqnV5+xew/hyD/0QBI9R2/a5BMSUIwpw9u X-Received: by 2002:a17:906:dd0:: with SMTP id p16mr6930102eji.389.1626372830301; Thu, 15 Jul 2021 11:13:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626372830; cv=none; d=google.com; s=arc-20160816; b=OVjW4HKB3zzo9nduLpu7jFahkAKWpMixMRHDfMOlg/8HqX8P7mWGSqE64/wPmAhhBp SN+ycqNw2TKD0xje4zE8CthUY3SbUvdU6n8CZku5jV0tNj3uAChLgBM7C+LPWzrsXtna 6AlTibUU2Ka48o6C4yYXuHYA544FRcqumRxeBZSZaAiqAioUNXGaH2pNNT47dptWXM+T 1hh2h1JaGTe1wJhuuu6lGrJffjs2KhACHcXIVc0BGhyuyC2aOmSNPSUn5c86PeuhK+1X 02uyqq0fLBjLwjMOUfD/imUwphWZKW0BnuX9sJTazO/E30sScFcGEdMnClrey2N+NUBt dzZA== 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=mKOsdep4+AHMtJyYdkPwuXhq2BB+9CFGuNQWr4puijY=; b=w4h4MStIO2jUWETBEBci0dW9Y0Ygl9ERDmffAntxuMG1ZhnKSqAA/DaW9P5Bt1TMxY Ct3w79uyGWm03Aegck/t/QR5/H9JsBFKAXrPJhswEkzi6sTGxrbWGVY82uL/hhDPsf0l Vpjoi17gs1vn0l1jBRk5TC+857mXs+Hv31p6JCQ4cFwOcLmb43PnLmdL9D0FhV7CT4tE kc+BI9i9xacZr21M9eCU/oUlnhoTz/rTziDc5gvz1xhxj4IFh1joJJ6a17ROB+NiUD5g pKUfNUZiEf+Q42bqpzQCs13NkHn2a4Wu7xsoi3A+bRMlJO1P11JvN8gKrcxiNCsYPXNs mUoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=iM2CI+kF; 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 h8si3816597ejj.422.2021.07.15.11.13.25; Thu, 15 Jul 2021 11:13:50 -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=iM2CI+kF; 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 S233831AbhGOQKh (ORCPT + 99 others); Thu, 15 Jul 2021 12:10:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47056 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232505AbhGOQKb (ORCPT ); Thu, 15 Jul 2021 12:10:31 -0400 Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CEF36C06175F; Thu, 15 Jul 2021 09:07:36 -0700 (PDT) Received: by mail-wr1-x42d.google.com with SMTP id t5so8457535wrw.12; Thu, 15 Jul 2021 09:07:36 -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=mKOsdep4+AHMtJyYdkPwuXhq2BB+9CFGuNQWr4puijY=; b=iM2CI+kFsbchyBJETgmZhp6HPqxuYV/XVicaXJIFhvcjuNkShQsO0QxvJ4zHiCeW78 WRzjK5SlWjHlGhL4RBq3G7UjnsNe3e4UjR8Fgz+MG5CDxmETSJJ+7iUQOVMEIRnj3T/o 2bJrAtj2d41HYUvx0Obi2Rfd6Qyzp9dRvWGh7731sG85PgpxvfzAkLHGJjyE9PR6X1Ob gdiLigMFHlM8nkRey8GutnxuWfOp8psX+lF137qJO7wLR2p2hC2o2R7waudjSZhWdM0v xgRkcYgfYrY3kod3q2m9MGkUGyVKS7/lj7q4MiAFOmDMoLb02kcxkTZO0Pv7JG0QzyeT cLug== 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=mKOsdep4+AHMtJyYdkPwuXhq2BB+9CFGuNQWr4puijY=; b=kRAYkxY4cIaofrcQS0P+ulrZQXU4Od13AqrqsreL2MLHZm0/hyNd8f1FlmBuP0OHRE xk/peC8a4p/u5ZtYauCR0rrKgRfcDaT48gKiDMYU7RHXh32tLHu348apAoTBzbnzyj5w mws3YTricDlCZUnEE0OoWLYUfCY6wsYhPXaTmiefvMonSysx8ra6uOmy5vQ3ROkShZ0F Hb/U7vMMyIbZ6xE1zLSqegtxqZPbEb+xeyR691MSiHE0XxESUz/Ens8xzZtAHFLW5H8U NgCUrG58PgHsXO6qRyJ+LCsSpSICE8wbklf8DWQu8b+EW0IyTk/7IJjg1mdTatsT5vas xuHg== X-Gm-Message-State: AOAM533Pc9PaPPDSWBGDlxzARgCa4l9XwRNjKUQpT4VwCfgdndR3fTke LCsOlAQHLK8HyvZ2emeiRlw= X-Received: by 2002:a5d:4e4d:: with SMTP id r13mr6570410wrt.224.1626365255334; Thu, 15 Jul 2021 09:07:35 -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.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Jul 2021 09:07:34 -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 07/20] perf test: maps__merge_in: fix memory leak of maps Date: Thu, 15 Jul 2021 18:07:12 +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 "65: maps__merge_in". This is the second and final patch addressing these memory leaks. This time, the problem is simply that the maps object is never destructed. This patch adds the missing maps__exit call. Signed-off-by: Riccardo Mancini --- tools/perf/tests/maps.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/perf/tests/maps.c b/tools/perf/tests/maps.c index edcbc70ff9d66e22..1ac72919fa358601 100644 --- a/tools/perf/tests/maps.c +++ b/tools/perf/tests/maps.c @@ -116,5 +116,7 @@ int test__maps__merge_in(struct test *t __maybe_unused, int subtest __maybe_unus ret = check_maps(merged3, ARRAY_SIZE(merged3), &maps); TEST_ASSERT_VAL("merge check failed", !ret); + + maps__exit(&maps); return TEST_OK; } -- 2.31.1