[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150504191636.GC11223@krava>
Date: Mon, 4 May 2015 21:16:36 +0200
From: Jiri Olsa <jolsa@...hat.com>
To: Taeung Song <treeze.taeung@...il.com>
Cc: Arnaldo Carvalho de Melo <acme@...nel.org>,
linux-kernel@...r.kernel.org, namhyung@...nel.org
Subject: Re: [PATCH 3/4] perf tools: Add a option 'all' to perf-config.
On Mon, Apr 27, 2015 at 03:34:25PM +0900, Taeung Song wrote:
SNIP
> +
> +static int show_all_config(void)
> +{
> + int ret = 0;
> + struct config_section *section_node;
> + struct config_element *element_node;
> + char *pwd, *all_config;
> +
> + pwd = getenv("PWD");
> + all_config = strdup(mkpath("%s/util/PERFCONFIG-DEFAULT", pwd));
> +
> + if (!all_config) {
> + pr_err("%s: strdup failed\n", __func__);
> + return -1;
> + }
> +
> + sections = zalloc(sizeof(*sections));
> + if (!sections)
> + return -1;
> + INIT_LIST_HEAD(sections);
this code pattern is already there, please placeit into function
also, where's the section freed?
jirka
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists