Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Feb 2024 00:24:31 GMT
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 11137153ab90 - stable/14 - fdlopen(3): do not create a new object mapping if already loaded
Message-ID:  <202402290024.41T0OVUH096232@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=11137153ab90c38cc5e9993f5c65491c47705024

commit 11137153ab90c38cc5e9993f5c65491c47705024
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2024-02-22 01:18:06 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2024-02-29 00:24:06 +0000

    fdlopen(3): do not create a new object mapping if already loaded
    
    PR:     277169
    
    (cherry picked from commit 452c5e9995ab4cd6c7ea230cffe0c53bfa65c1ab)
---
 libexec/rtld-elf/rtld.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c
index d32c80debc1d..f11fe8afcc32 100644
--- a/libexec/rtld-elf/rtld.c
+++ b/libexec/rtld-elf/rtld.c
@@ -2742,8 +2742,9 @@ load_object(const char *name, int fd_u, const Obj_Entry *refobj, int flags)
 	if (obj->ino == sb.st_ino && obj->dev == sb.st_dev)
 	    break;
     }
-    if (obj != NULL && name != NULL) {
-	object_add_name(obj, name);
+    if (obj != NULL) {
+	if (name != NULL)
+	    object_add_name(obj, name);
 	free(path);
 	close(fd);
 	return (obj);



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