projects
/
babeltrace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add missing generated tests to gitignore
[babeltrace.git]
/
lib
/
bin-info.c
diff --git
a/lib/bin-info.c
b/lib/bin-info.c
index 3bd080760e2e4a61f78e405e446e0085bf1cfd78..e5d515005125510e0537603e05d299aac904839c 100644
(file)
--- a/
lib/bin-info.c
+++ b/
lib/bin-info.c
@@
-482,7
+482,7
@@
end:
static
int bin_info_set_elf_file(struct bin_info *bin)
{
static
int bin_info_set_elf_file(struct bin_info *bin)
{
- int elf_fd;
+ int elf_fd
= -1
;
Elf *elf_file = NULL;
if (!bin) {
Elf *elf_file = NULL;
if (!bin) {
@@
-512,12
+512,13
@@
int bin_info_set_elf_file(struct bin_info *bin)
return 0;
error:
return 0;
error:
- close(elf_fd);
+ if (elf_fd >= 0) {
+ close(elf_fd);
+ }
elf_end(elf_file);
return -1;
}
elf_end(elf_file);
return -1;
}
-
BT_HIDDEN
void source_location_destroy(struct source_location *src_loc)
{
BT_HIDDEN
void source_location_destroy(struct source_location *src_loc)
{
@@
-528,6
+529,7
@@
void source_location_destroy(struct source_location *src_loc)
free(src_loc->filename);
g_free(src_loc);
}
free(src_loc->filename);
g_free(src_loc);
}
+
/**
* Append a string representation of an address offset to an existing
* string.
/**
* Append a string representation of an address offset to an existing
* string.
This page took
0.023573 seconds
and
4
git commands to generate.