projects
/
linux-2.6-microblaze.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
perf bpf: Defer freeing string after possible strlen() on it
[linux-2.6-microblaze.git]
/
tools
/
perf
/
util
/
bpf-loader.c
diff --git
a/tools/perf/util/bpf-loader.c
b/tools/perf/util/bpf-loader.c
index
7ecfaac
..
16ec605
100644
(file)
--- a/
tools/perf/util/bpf-loader.c
+++ b/
tools/perf/util/bpf-loader.c
@@
-1220,9
+1220,10
@@
bpf__obj_config_map(struct bpf_object *obj,
pr_debug("ERROR: Invalid map config option '%s'\n", map_opt);
err = -BPF_LOADER_ERRNO__OBJCONF_MAP_OPT;
out:
- free(map_name);
if (!err)
*key_scan_pos += strlen(map_opt);
+
+ free(map_name);
return err;
}