diff options
-rw-r--r-- | libltrace.c | 3 | ||||
-rw-r--r-- | ltrace-elf.c | 4 | ||||
-rw-r--r-- | ltrace-elf.h | 1 |
3 files changed, 5 insertions, 3 deletions
diff --git a/libltrace.c b/libltrace.c index f4bb2c8..214b332 100644 --- a/libltrace.c +++ b/libltrace.c @@ -1,6 +1,6 @@ /* * This file is part of ltrace. - * Copyright (C) 2011 Petr Machata, Red Hat Inc. + * Copyright (C) 2011,2012 Petr Machata, Red Hat Inc. * Copyright (C) 2009 Juan Cespedes * * This program is free software; you can redistribute it and/or @@ -134,6 +134,7 @@ ltrace_init(int argc, char **argv) { * calling execute_program. */ struct ltelf lte = {}; open_elf(<e, command); + do_close_elf(<e); pid_t pid = execute_program(command, argv); struct Process *proc = open_program(command, pid); diff --git a/ltrace-elf.c b/ltrace-elf.c index 89ddc3a..020159c 100644 --- a/ltrace-elf.c +++ b/ltrace-elf.c @@ -479,9 +479,9 @@ do_init_elf(struct ltelf *lte, const char *filename) return 0; } -/* XXX temporarily non-static */ void -do_close_elf(struct ltelf *lte) { +do_close_elf(struct ltelf *lte) +{ debug(DEBUG_FUNCTION, "do_close_elf()"); arch_elf_destroy(lte); elf_end(lte->elf); diff --git a/ltrace-elf.h b/ltrace-elf.h index 7cd1369..5470c28 100644 --- a/ltrace-elf.h +++ b/ltrace-elf.h @@ -68,6 +68,7 @@ struct ltelf { }; int open_elf(struct ltelf *lte, const char *filename); +void do_close_elf(struct ltelf *lte); /* XXX is it possible to put breakpoints in VDSO and VSYSCALL * pseudo-libraries? For now we assume that all libraries can be |