diff options
| author | Ulrich Drepper <[email protected]> | 2007-01-30 16:51:59 +0000 |
|---|---|---|
| committer | Ulrich Drepper <[email protected]> | 2007-01-30 16:51:59 +0000 |
| commit | cd8a250aa139016def485e91d2da49c87de3baec (patch) | |
| tree | d86f5d1fb9426b0c19ccf2d24b54475f3d43d89f | |
| parent | 66c650e9c03734616425b467e83c8e93a4eeeb48 (diff) | |
One more correction, handle failing elf_begin correctly.
| -rw-r--r-- | libelf/nlist.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libelf/nlist.c b/libelf/nlist.c index c657465b..f1fe1763 100644 --- a/libelf/nlist.c +++ b/libelf/nlist.c @@ -108,7 +108,7 @@ nlist (const char *filename, struct nlist *nl) /* Now get an ELF descriptor. */ elf = INTUSE(elf_begin) (fd, ELF_C_READ_MMAP, NULL); if (elf == NULL) - goto fail; + goto fail_fd; /* Find a symbol table. We prefer the real symbol table but if it does not exist use the dynamic symbol table. */ @@ -242,6 +242,7 @@ nlist (const char *filename, struct nlist *nl) /* We do not need the ELF descriptor anymore. */ (void) INTUSE(elf_end) (elf); + fail_fd: /* Neither the file descriptor. */ (void) close (fd); |
