summaryrefslogtreecommitdiff
path: root/elf
diff options
context:
space:
mode:
authorMartin Sebor <msebor@redhat.com>2022-01-25 17:37:56 -0700
committerMartin Sebor <msebor@redhat.com>2022-01-25 17:37:56 -0700
commit03ad86880f68f498ee04e9ea84cd4f0d14473970 (patch)
tree26c9a3ccac54f035a5ac8a1d8cc4f4e0e2f29c0c /elf
parent342cc934a3bf74ac618e2318d738f22ac93257ba (diff)
downloadglibc-03ad86880f68f498ee04e9ea84cd4f0d14473970.tar.gz
elf: Fix use-after-free in ldconfig [BZ #26779]
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'elf')
-rw-r--r--elf/ldconfig.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/elf/ldconfig.c b/elf/ldconfig.c
index d14633f5ec..57bb95ebc3 100644
--- a/elf/ldconfig.c
+++ b/elf/ldconfig.c
@@ -735,9 +735,9 @@ manual_link (char *library)
create_links (real_path, path, libname, soname);
free (soname);
out:
- free (path);
if (path != real_path)
free (real_path);
+ free (path);
}