[PATCH] [BUGFIX]perf probe: Fix to close target file

From: Masami Hiramatsu
Date: Tue Apr 26 2016 - 02:36:16 EST


Fix a bug to close target elf file in get_text_start_address().

Signed-off-by: Masami Hiramatsu <mhiramat@xxxxxxxxxx>
---
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;
}