From: Martin Sebor Date: Wed, 26 Jan 2022 00:37:56 +0000 (-0700) Subject: elf: Fix use-after-free in ldconfig [BZ #26779] X-Git-Tag: glibc-2.35~38 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=03ad86880f68f498ee04e9ea84cd4f0d14473970;p=thirdparty%2Fglibc.git elf: Fix use-after-free in ldconfig [BZ #26779] Reviewed-by: Carlos O'Donell --- diff --git a/elf/ldconfig.c b/elf/ldconfig.c index d14633f5ec1..57bb95ebc33 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); }