Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Apr 2011 06:55:25 +0000 (UTC)
From:      Andriy Gapon <avg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
Subject:   svn commit: r220441 - stable/7/libexec/rtld-elf
Message-ID:  <201104080655.p386tPmr067031@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: avg
Date: Fri Apr  8 06:55:25 2011
New Revision: 220441
URL: http://svn.freebsd.org/changeset/base/220441

Log:
  MFC r220004: rtld: eliminate double call to close(2) that may occur in load_object

Modified:
  stable/7/libexec/rtld-elf/rtld.c
Directory Properties:
  stable/7/libexec/rtld-elf/   (props changed)

Modified: stable/7/libexec/rtld-elf/rtld.c
==============================================================================
--- stable/7/libexec/rtld-elf/rtld.c	Fri Apr  8 06:50:26 2011	(r220440)
+++ stable/7/libexec/rtld-elf/rtld.c	Fri Apr  8 06:55:25 2011	(r220441)
@@ -1474,12 +1474,9 @@ load_object(const char *name, const Obj_
 	free(path);
 	return NULL;
     }
-    for (obj = obj_list->next;  obj != NULL;  obj = obj->next) {
-	if (obj->ino == sb.st_ino && obj->dev == sb.st_dev) {
-	    close(fd);
+    for (obj = obj_list->next;  obj != NULL;  obj = obj->next)
+	if (obj->ino == sb.st_ino && obj->dev == sb.st_dev)
 	    break;
-	}
-    }
     if (obj != NULL) {
 	object_add_name(obj, name);
 	free(path);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201104080655.p386tPmr067031>