diff options
Diffstat (limited to 'src/size.c')
-rw-r--r-- | src/size.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -374,8 +374,10 @@ handle_ar (int fd, Elf *elf, const char *prefix, const char *fname) INTERNAL_ERROR (fname); } - if (unlikely (elf_end (elf) != 0)) - INTERNAL_ERROR (fname); + /* Only close ELF handle if this was a "top level" ar file. */ + if (prefix == NULL) + if (unlikely (elf_end (elf) != 0)) + INTERNAL_ERROR (fname); return result; } |