Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/libexec/ld.elf_so CID 1132773: Fix file descriptor leak



details:   https://anonhg.NetBSD.org/src/rev/c330665440e9
branches:  trunk
changeset: 791655:c330665440e9
user:      christos <christos%NetBSD.org@localhost>
date:      Wed Nov 27 18:01:33 2013 +0000

description:
CID 1132773: Fix file descriptor leak

diffstat:

 libexec/ld.elf_so/load.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r 642ad2bcc9f4 -r c330665440e9 libexec/ld.elf_so/load.c
--- a/libexec/ld.elf_so/load.c  Wed Nov 27 17:58:59 2013 +0000
+++ b/libexec/ld.elf_so/load.c  Wed Nov 27 18:01:33 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: load.c,v 1.46 2013/11/20 07:18:23 skrll Exp $   */
+/*     $NetBSD: load.c,v 1.47 2013/11/27 18:01:33 christos Exp $        */
 
 /*
  * Copyright 1996 John D. Polstra.
@@ -40,7 +40,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: load.c,v 1.46 2013/11/20 07:18:23 skrll Exp $");
+__RCSID("$NetBSD: load.c,v 1.47 2013/11/27 18:01:33 christos Exp $");
 #endif /* not lint */
 
 #include <err.h>
@@ -149,6 +149,7 @@
 #ifdef RTLD_LOADER
        if (pathlen == _rtld_objself.pathlen &&
            strcmp(_rtld_objself.path, filepath) == 0) {
+               close(fd);
                return &_rtld_objself;
        }
 #endif



Home | Main Index | Thread Index | Old Index