Fix a bug to close target elf file in get_text_start_address(). Signed-off-by: Masami Hiramatsu <mhira...@kernel.org> --- tools/perf/util/probe-event.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c index 8319fbb..258b49d 100644 --- a/tools/perf/util/probe-event.c +++ b/tools/perf/util/probe-event.c @@ -499,6 +499,7 @@ static int get_text_start_address(const char *exec, unsigned long *address) ret = 0; out: elf_end(elf); + close(fd); return ret; }