From patchwork Mon Feb 15 21:01:40 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaldo Carvalho de Melo X-Patchwork-Id: 61964 Delivered-To: patch@linaro.org Received: by 10.112.43.199 with SMTP id y7csp1290949lbl; Mon, 15 Feb 2016 13:03:12 -0800 (PST) X-Received: by 10.98.2.21 with SMTP id 21mr26270366pfc.11.1455570192542; Mon, 15 Feb 2016 13:03:12 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ly9si45590373pab.115.2016.02.15.13.03.12; Mon, 15 Feb 2016 13:03:12 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754058AbcBOVDK (ORCPT + 30 others); Mon, 15 Feb 2016 16:03:10 -0500 Received: from [198.137.202.9] ([198.137.202.9]:49940 "EHLO bombadil.infradead.org" rhost-flags-FAIL-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1753995AbcBOVDH (ORCPT ); Mon, 15 Feb 2016 16:03:07 -0500 Received: from [187.65.76.58] (helo=jouet.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.80.1 #2 (Red Hat Linux)) id 1aVQHL-0000AL-C9; Mon, 15 Feb 2016 21:01:55 +0000 Received: by jouet.infradead.org (Postfix, from userid 1000) id B1129143FF5; Mon, 15 Feb 2016 18:01:48 -0300 (BRT) From: Arnaldo Carvalho de Melo To: Ingo Molnar Cc: linux-kernel@vger.kernel.org, Wang Nan , Alexei Starovoitov , He Kuang , Masami Hiramatsu , Namhyung Kim , Zefan Li , pi3orama@163.com, Arnaldo Carvalho de Melo Subject: [PATCH 10/13] perf tools: Free the terms list_head in parse_events__free_terms() Date: Mon, 15 Feb 2016 18:01:40 -0300 Message-Id: <1455570103-29211-11-git-send-email-acme@kernel.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1455570103-29211-1-git-send-email-acme@kernel.org> References: <1455570103-29211-1-git-send-email-acme@kernel.org> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Wang Nan Fixing a leak, since code calling parse_events__free_terms() expect it to free the list_head too. Signed-off-by: Wang Nan Acked-by: Jiri Olsa Cc: Alexei Starovoitov Cc: He Kuang Cc: Masami Hiramatsu Cc: Namhyung Kim Cc: Zefan Li Cc: pi3orama@163.com [ Spun off from another patch ] Link: http://lkml.kernel.org/r/1454680939-24963-2-git-send-email-wangnan0@huawei.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/parse-events.c | 1 + 1 file changed, 1 insertion(+) -- 2.5.0 diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c index 668afdccfcca..d1b49ec7ae46 100644 --- a/tools/perf/util/parse-events.c +++ b/tools/perf/util/parse-events.c @@ -2081,6 +2081,7 @@ void parse_events_terms__purge(struct list_head *terms) void parse_events__free_terms(struct list_head *terms) { parse_events_terms__purge(terms); + free(terms); } void parse_events_evlist_error(struct parse_events_evlist *data,