projects
/
platform
/
upstream
/
ltrace.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e6c25f6
)
In ltrace_init, don't call ltelf_destroy if ltelf_init fails
author
Petr Machata
<pmachata@redhat.com>
Mon, 11 Nov 2013 01:27:08 +0000
(
02:27
+0100)
committer
Chanho Park
<chanho61.park@samsung.com>
Fri, 22 Aug 2014 11:38:23 +0000
(20:38 +0900)
libltrace.c
patch
|
blob
|
history
diff --git
a/libltrace.c
b/libltrace.c
index
a8dd61e
..
2d910a1
100644
(file)
--- a/
libltrace.c
+++ b/
libltrace.c
@@
-116,9
+116,13
@@
ltrace_init(int argc, char **argv)
if (command) {
/* Check that the binary ABI is supported before
* calling execute_program. */
- struct ltelf lte;
- ltelf_init(<e, command);
- ltelf_destroy(<e);
+ {
+ struct ltelf lte;
+ if (ltelf_init(<e, command) == 0)
+ ltelf_destroy(<e);
+ else
+ exit(EXIT_FAILURE);
+ }
pid_t pid = execute_program(command, argv);
struct process *proc = open_program(command, pid);