summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
d6d3f4e)
elf_fd is uninitialized whenever bin is NULL.
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
static
int bin_info_set_elf_file(struct bin_info *bin)
{
static
int bin_info_set_elf_file(struct bin_info *bin)
{
Elf *elf_file = NULL;
if (!bin) {
Elf *elf_file = NULL;
if (!bin) {
+ if (elf_fd >= 0) {
+ close(elf_fd);
+ }
elf_end(elf_file);
return -1;
}
elf_end(elf_file);
return -1;
}