perf header: Fix memory leaks when processing feature headers
These leaks were found with leak sanitizer running "perf pipe recording
and injection test".
In pipe mode feat_fd may hold onto an events struct that needs freeing.
When string features are processed they may overwrite an already created
string, so free this before the overwrite.
Signed-off-by: Ian Rogers <email@example.com>
Acked-by: Jiri Olsa <firstname.lastname@example.org>
Cc: Alexander Shishkin <email@example.com>
Cc: Mark Rutland <firstname.lastname@example.org>
Cc: Namhyung Kim <email@example.com>
Cc: Peter Zijlstra <firstname.lastname@example.org>
Cc: Stephane Eranian <email@example.com>
Signed-off-by: Arnaldo Carvalho de Melo <firstname.lastname@example.org>
1 file changed