Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp695007pxv; Thu, 15 Jul 2021 13:41:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwRRLSq58BhfieZg7CMxkqOjpPDiOvAT/Eb4BKu4s+3djGBlQkn5oC+nlCx9hoYYQfJull4 X-Received: by 2002:a5d:9b9a:: with SMTP id r26mr4615943iom.34.1626381692480; Thu, 15 Jul 2021 13:41:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626381692; cv=none; d=google.com; s=arc-20160816; b=PtgAyt8iskWRjlkHzswr1IWi4Egpwb7zPjjKUhx12TqekfmurR96J4Co0scNFJqQpX mkcu8oc/MU4fYyRlyfyIGhDXyRvAXbiyKVqIJNcVA54QCzDJZFdAXr8fwbtQUc+iYyum EDR59m/A0eLiBqhuRF6RoAQo/lz2olRZAwTrPpfQY4cUvT6mcdK1/4pwsLixu3+ETUCC 8sZDEVtSZMcO18GxPiCTpgn4ch55D8PwoeeVaGqY8qSAZGIrrO03TBPeAGO2cDzFyFL4 P8/ztxXYFC6qJukoiRPABkpR74JVxT7TcUnw4Dp1ihpVH8oE/SK9/BV7d6az3DPv7UhP 48OA== 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=2zp1vjptmmjpsOA2yxEP8PsW1jZP0MqusGDqkpd6uck=; b=NFC5dFUT1MQXMx6Z9pNrDx/UpCMc7KUYzMDtE9QSS0kirXOsVrrTHZWSURePaSLSrB HmEziIYXfdKKFK29oWH/b/G1Dw4n3RHyNqmMKdNScv74Jtq9hLZ6a0rAZgkol9tNiyRT K0Lx6+NTOraYIGxtswD1s4SxkHDBLKzPIDYmBdqyzSzvyeBd5snOxLWFYDS80G1oWZpr P95J6T59me/HwXYaxf7LhIQ45yC67MG41JfCEPTdOuXUgd2gvoygfRq90bELIlIOFJdr c8lLwjdv/NSvcHtpzzCyslEF4oDNnkf8SEbhroFk+5fPhiGCmpoYZ0Eix+4sMG0fXzyc 8tqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nkPko4q6; 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 b15si7623222ilv.151.2021.07.15.13.41.19; Thu, 15 Jul 2021 13:41:32 -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=nkPko4q6; 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 S237729AbhGOUmc (ORCPT + 99 others); Thu, 15 Jul 2021 16:42:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:60052 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237504AbhGOUma (ORCPT ); Thu, 15 Jul 2021 16:42:30 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 028D2613D4; Thu, 15 Jul 2021 20:39:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1626381577; bh=C8fLfilXLg7ljnDMO6+nnt/GtaHy+/e4ktyzhwy3JnI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=nkPko4q6xInQayyWDXLR+AACOHdEWis5GQZI2ntxdLs1pZofzPOVCGk3zyjOALKBw bPV3fVdFZjT2O1IghY3KuFBwpKRFXYajlNVxDp2h+dayGIYcu6BlsxlORoNzRIvPNd 0OheaT0njs+YTKAqeDbJx8+MbbGdSFd6/Vzl+1thsSy9iXBdgw+EfFE0F8ucQxR7Lx y1Khoq5nuppPQoNr53BoLmducAYSZwW5U2GzgAmabZx2NZOGiKtHGQzEiBdQEY7zgA q5kGpOmJLuNR1s4k1MDZ/koEitW+pDswHKnp4Un3oL+bFGrJLjiiXVhMDQfMn3E7jj a4oloQ8FyL4nw== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 7898E403F2; Thu, 15 Jul 2021 17:39:34 -0300 (-03) Date: Thu, 15 Jul 2021 17:39:34 -0300 From: Arnaldo Carvalho de Melo To: Riccardo Mancini Cc: Wang Nan , 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 19/20] perf test: bpf: free obj_buf Message-ID: References: <60f3ca935fe6672e7e866276ce6264c9e26e4c87.1626343282.git.rickyman7@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <60f3ca935fe6672e7e866276ce6264c9e26e4c87.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:24PM +0200, Riccardo Mancini escreveu: > ASan reports some memory leaks when running the perf test > "42: BPF filter". > The first of these leaks is caused by obj_buf never being deallocated in > __test__bpf. > > This patch adds the missing free. Fixes: ba1fae431e74bb42 ("perf test: Add 'perf test BPF'") Thanks, applied. - Arnaldo > Signed-off-by: Riccardo Mancini > --- > tools/perf/tests/bpf.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/tools/perf/tests/bpf.c b/tools/perf/tests/bpf.c > index 33bda9c265423547..2cda4a6297e07967 100644 > --- a/tools/perf/tests/bpf.c > +++ b/tools/perf/tests/bpf.c > @@ -276,6 +276,7 @@ static int __test__bpf(int idx) > } > > out: > + free(obj_buf); > bpf__clear(); > return ret; > } > -- > 2.31.1 > -- - Arnaldo