]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
elf: Fix use-after-free in ldconfig [BZ #26779]
authorMartin Sebor <msebor@redhat.com>
Wed, 26 Jan 2022 00:37:56 +0000 (17:37 -0700)
committerMartin Sebor <msebor@redhat.com>
Wed, 26 Jan 2022 00:37:56 +0000 (17:37 -0700)
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
elf/ldconfig.c

index d14633f5ec1cbbaf10a4c0426f015f62406879ee..57bb95ebc3343c83f9858885a79dd94dd452f46a 100644 (file)
@@ -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);
 }