summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/util/config.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/perf/util/config.c b/tools/perf/util/config.c
index c73f1c4..e086f59 100644
--- a/tools/perf/util/config.c
+++ b/tools/perf/util/config.c
@@ -643,7 +643,6 @@ static int collect_config(const char *var, const char *value,
out_free:
free(key);
- perf_config_set__delete(set);
return -1;
}
@@ -653,7 +652,10 @@ struct perf_config_set *perf_config_set__new(void)
if (set) {
INIT_LIST_HEAD(&set->sections);
- perf_config(collect_config, set);
+ if (perf_config(collect_config, set) < 0) {
+ perf_config_set__delete(set);
+ set = NULL;
+ }
}
return set;
OpenPOWER on IntegriCloud