git: 58ac9bf7248d - stable/15 - rtld.c: avoid double-free on dso load failure in do_load_object()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 09 Oct 2026 00:26:48 UTC
The branch stable/15 has been updated by kib:
URL: https://cgit.FreeBSD.org/src/commit/?id=58ac9bf7248d133e55401eb6851573c6176c47f9
commit 58ac9bf7248d133e55401eb6851573c6176c47f9
Author: Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2026-10-06 08:22:21 +0000
Commit: Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2026-10-09 00:26:27 +0000
rtld.c: avoid double-free on dso load failure in do_load_object()
(cherry picked from commit 274236ed084a259a0e8a11df1afebd2f2f1fb097)
---
libexec/rtld-elf/rtld.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c
index 10fdbfa597cb..f62b271c2ec5 100644
--- a/libexec/rtld-elf/rtld.c
+++ b/libexec/rtld-elf/rtld.c
@@ -3027,6 +3027,7 @@ do_load_object(int fd, const char *name, char *path, struct stat *sbp,
errp:
munmap(obj->mapbase, obj->mapsize);
+ obj->path = NULL; /* obj->path is owned and freed by caller */
obj_free(obj);
return (NULL);
}