From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754680AbaHNIqR (ORCPT ); Thu, 14 Aug 2014 04:46:17 -0400 Received: from terminus.zytor.com ([198.137.202.10]:36342 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751803AbaHNIqO (ORCPT ); Thu, 14 Aug 2014 04:46:14 -0400 Date: Thu, 14 Aug 2014 01:45:54 -0700 From: tip-bot for Namhyung Kim Message-ID: Cc: acme@redhat.com, linux-kernel@vger.kernel.org, paulus@samba.org, hpa@zytor.com, mingo@kernel.org, jolsa@kernel.org, a.p.zijlstra@chello.nl, minchan@kernel.org, namhyung.kim@lge.com, namhyung@kernel.org, jolsa@redhat.com, adrian.hunter@intel.com, dsahern@gmail.com, tglx@linutronix.de Reply-To: mingo@kernel.org, hpa@zytor.com, paulus@samba.org, linux-kernel@vger.kernel.org, acme@redhat.com, jolsa@kernel.org, minchan@kernel.org, a.p.zijlstra@chello.nl, namhyung.kim@lge.com, namhyung@kernel.org, jolsa@redhat.com, dsahern@gmail.com, adrian.hunter@intel.com, tglx@linutronix.de In-Reply-To: <1407825645-24586-3-git-send-email-namhyung@kernel.org> References: <1407825645-24586-3-git-send-email-namhyung@kernel.org> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf symbols: Fix a memory leak in vmlinux_path__init() Git-Commit-ID: e96c674fe2c228fd5c16fd7a7607c60dea4cdaa2 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: e96c674fe2c228fd5c16fd7a7607c60dea4cdaa2 Gitweb: http://git.kernel.org/tip/e96c674fe2c228fd5c16fd7a7607c60dea4cdaa2 Author: Namhyung Kim AuthorDate: Tue, 12 Aug 2014 15:40:34 +0900 Committer: Arnaldo Carvalho de Melo CommitDate: Wed, 13 Aug 2014 16:30:22 -0300 perf symbols: Fix a memory leak in vmlinux_path__init() When uname() failed, it should free vmlinux_path. Acked-by: Jiri Olsa Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: David Ahern Cc: Ingo Molnar Cc: Jiri Olsa Cc: Minchan Kim Cc: Namhyung Kim Cc: Paul Mackerras Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1407825645-24586-3-git-send-email-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/symbol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c index 581c568..009a9d0 100644 --- a/tools/perf/util/symbol.c +++ b/tools/perf/util/symbol.c @@ -1772,7 +1772,7 @@ static int vmlinux_path__init(void) return 0; if (uname(&uts) < 0) - return -1; + goto out_fail; snprintf(bf, sizeof(bf), "/boot/vmlinux-%s", uts.release); vmlinux_path[vmlinux_path__nr_entries] = strdup(bf);