diff options
author | Wang Nan <[email protected]> | 2015-12-08 02:25:29 +0000 |
---|---|---|
committer | Arnaldo Carvalho de Melo <[email protected]> | 2015-12-11 08:51:09 -0300 |
commit | 973170e66726672518eb935eb0dc0e63876d133d (patch) | |
tree | 08c9cbfc910c13eb1bce3130c0d775e20913f46c /tools/perf/scripts/python/call-graph-from-postgresql.py | |
parent | beefb8d0e556aaf3cb69168c5953e023ace6aa78 (diff) |
tools lib bpf: Check return value of strdup when reading map names
Commit 561bbccac72d08babafaa33fd7fa9100ec4c9fb6 ("tools lib bpf:
Extract and collect map names from BPF object file") forgets checking
return value of strdup(). This patch fixes it. It also checks names
pointer before strcmp() for safety.
Signed-off-by: Wang Nan <[email protected]>
Acked-by: Namhyung Kim <[email protected]>
Cc: Zefan Li <[email protected]>
Cc: [email protected]
Fixes: 561bbccac72d ("tools lib bpf: Extract and collect map names from BPF object file")
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/call-graph-from-postgresql.py')
0 files changed, 0 insertions, 0 deletions