Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp920534pxj; Wed, 2 Jun 2021 15:15:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy4qHrLRLWTeaKDpaoccKkW3c8APZhlKz9Q97Vse4zxlaKSmv4J7n4QN6R6J+HfMOlViaSd X-Received: by 2002:a17:906:d150:: with SMTP id br16mr15047377ejb.190.1622672108769; Wed, 02 Jun 2021 15:15:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622672108; cv=none; d=google.com; s=arc-20160816; b=oyLNiiDGdJDWs2Z4qFTQeRgjUcekdALj0fcnsw1GQlmx/8v2PyiwnlhkJZEIX/TIc+ sMCoFTh252PW7X5koLcFkAXuakaa+Ax2M16qVXjWLlr7ArQu68AhRAqm51MBqZJGBDMn pMWZiyvfsPvzzt0R+7b5CG8biEQsPXTRJBP4hRHEuRI3ONMx4DlQkw6He/Des5gY4GL+ YjtFCWR8ALRljvpQTDxtfVCFNKjqvr2z7EHfpNpyMr0ENoSGorYiSStarswZ3f8MwnF2 Vq5OoORlR7qe4E2qMoO2IM/Rr+3+32VG7VGk3KvdWtp2H3XMBEnnJU3AK+Mkk0LJETDa FzBA== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=PDHp86QEN5vhB4RtZpZVG/Zl2JnNrckM7sNyGAPWl3Y=; b=VUW+rAw/D5zwpc6wxHOIv+FFznEdfO1efx/+3JIh3Qh4f2xA0xoHAm6eMllNVnTaY/ mQjazj40hfZFlHI/mW/e6tBPvCZg2/Sgk7/FPLzFYYXPL3vgYSIJZ8zqtafOUE9ohdaY khpwKpYftkZBBq4aodiZibAV0U++n0/shdNBIiZGprClP/xAwNw0CxMSVg36Ac0dyZkO PGJID6BHZnrUnMQ7zrUoweccJjdoiZjwHyaNA7ejjsyQzVhIGiVRTIHHYdMJp4GAj89i zOfTUvEYQ8XUXFvm4vQ502hyUo2Te4IHAm4lHLgpG+WgguDFoN3oUxHGPXvYom/i3pP3 PYTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=KtO94Boe; 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 j9si775544ejt.118.2021.06.02.15.14.44; Wed, 02 Jun 2021 15:15:08 -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=KtO94Boe; 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 S229790AbhFBWO2 (ORCPT + 99 others); Wed, 2 Jun 2021 18:14:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57434 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229552AbhFBWO1 (ORCPT ); Wed, 2 Jun 2021 18:14:27 -0400 Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 495A8C06174A; Wed, 2 Jun 2021 15:12:30 -0700 (PDT) Received: by mail-wm1-x32e.google.com with SMTP id p13-20020a05600c358db029019f44afc845so2503673wmq.3; Wed, 02 Jun 2021 15:12:30 -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:mime-version :content-transfer-encoding; bh=PDHp86QEN5vhB4RtZpZVG/Zl2JnNrckM7sNyGAPWl3Y=; b=KtO94BoemKgkuUNbAKcBQ8dPqLqhhhPmPEup1lJQ+iZdQsuo7jM3HnG4AqrGS5+zzd MpUM1bSFtLm/XEqEIA8q/6ZppvV3yIX12m2gYVMYeFN8FbXbO/DgjJ9P8W+sPY96SUeV X55OPFH7aXJ+m6+I0itAHnPS5sNk2yCEL866CnvcXujPfrGA7426iRNImm162EWcVLfg 3ECmbJ5UDkpTdyfzAqywfHV75cT3ptCaAqiIwubtki0xV+I9BQYGTYQsbLLe/WzR9kd0 r19DijyuMiIx2BEPoyiY0cULO7WhvwvTd4oyd89VGtQBPLUAOmwGFr8yNM+OgOMIZt23 nx/A== 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:mime-version :content-transfer-encoding; bh=PDHp86QEN5vhB4RtZpZVG/Zl2JnNrckM7sNyGAPWl3Y=; b=rtGB0sxrvpUcFsszEW964+OFRKhz95m31qIFRTe/iWetk/6gwkIdLt+VBS+OLmimpS 6Vkzf/WrmDtzKtZZRZL69BdHDpzdp+5Tj3lsZxZf0ywkZdZpy0rp8vNouRl5fx/2WFc0 ut4ydcTLDRwG8PKWFQPvhtMJYe0KrY0YCwvtMZcTFELwsIvlFesm84Ve92jS9cOEqUpa i2Oxv4OUxKqOzyiAeOtzc2mkT+6CzuFQ9/aMckJznfC9No12CNpTlh/h7i4ep0Ih8P2f DFK8kckITZf/CV6pLnGy8BhCUeFYkJBcCV5kKFgOSAKG13kXFBa8TPupvDwHNuiTq0cI cjaA== X-Gm-Message-State: AOAM531QRaIVqxNHm65FMi3G1BZi1HztamNx1yGRpyQRIaB/EG0lT65j XLcA+/5ndjErsE+LMvm5jz8= X-Received: by 2002:a7b:c005:: with SMTP id c5mr34410627wmb.113.1622671948880; Wed, 02 Jun 2021 15:12:28 -0700 (PDT) Received: from honeypot.epfl.ch ([151.29.82.133]) by smtp.googlemail.com with ESMTPSA id j1sm875775wmi.44.2021.06.02.15.12.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Jun 2021 15:12:28 -0700 (PDT) From: Riccardo Mancini To: Arnaldo Carvalho de Melo , Namhyung Kim , Ian Rogers Cc: Riccardo Mancini , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Fabian Hemmer , Remi Bernon , Jiri Slaby , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] perf symbol-elf: fix memory leak: free sdt_note.args Date: Thu, 3 Jun 2021 00:08:33 +0200 Message-Id: <20210602220833.285226-1-rickyman7@gmail.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Reported by ASan. Signed-off-by: Riccardo Mancini --- tools/perf/util/symbol-elf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/perf/util/symbol-elf.c b/tools/perf/util/symbol-elf.c index 4c56aa8374344..a73345730ba90 100644 --- a/tools/perf/util/symbol-elf.c +++ b/tools/perf/util/symbol-elf.c @@ -2412,6 +2412,7 @@ int cleanup_sdt_note_list(struct list_head *sdt_notes) list_for_each_entry_safe(pos, tmp, sdt_notes, note_list) { list_del_init(&pos->note_list); + zfree(&pos->args); zfree(&pos->name); zfree(&pos->provider); free(pos); -- 2.31.1