From: Ulrich Drepper Date: Tue, 30 Jan 2007 16:19:09 +0000 (+0000) Subject: merge of 'c249e2584bf9a7142285afa71425029b4278e771' X-Git-Tag: elfutils-0.126~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ecf2b124a22590ac47688a6e8c2ff8865d23f774;p=thirdparty%2Felfutils.git merge of 'c249e2584bf9a7142285afa71425029b4278e771' and 'f6e8ba00784e83d73dc2183c444f6595474796e4' --- diff --git a/libelf/ChangeLog b/libelf/ChangeLog index f3cf68972..8d1f289d1 100644 --- a/libelf/ChangeLog +++ b/libelf/ChangeLog @@ -1,3 +1,7 @@ +2007-01-30 Ulrich Drepper + + * nlist.c: Close file descriptor before returning. + 2006-10-13 Roland McGrath * elf32_updatenull.c: Look for and accept phdr also for ET_CORE. diff --git a/libelf/nlist.c b/libelf/nlist.c index fd2209dfa..b3a6af0d6 100644 --- a/libelf/nlist.c +++ b/libelf/nlist.c @@ -230,6 +230,9 @@ nlist (const char *filename, struct nlist *nl) /* We do not need the ELF descriptor anymore. */ (void) INTUSE(elf_end) (elf); + /* Neither the file descriptor. */ + (void) close (fd); + return 0; fail_dealloc: @@ -239,6 +242,9 @@ nlist (const char *filename, struct nlist *nl) /* We do not need the ELF descriptor anymore. */ (void) INTUSE(elf_end) (elf); + /* Neither the file descriptor. */ + (void) close (fd); + fail: /* We have to set all entries to zero. */ while (nl->n_name != NULL && nl->n_name[0] != '\0')