]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - elf/unload2.c
Fix bad pointer / leak in regex code
[thirdparty/glibc.git] / elf / unload2.c
index 7a380534338bca77bf6ac7c253164e45fd2b8b8b..eef2bfd42688f1572658c89918e8c62b46d12d81 100644 (file)
@@ -6,11 +6,13 @@
 #include <stdio.h>
 #include <stdlib.h>
 
+#define MAPS ((struct link_map *) _r_debug.r_map)
+
 #define OUT \
-  for (map = _r_debug.r_map; map != NULL; map = map->l_next)                 \
+  for (map = MAPS; map != NULL; map = map->l_next)                           \
     if (map->l_type == lt_loaded)                                            \
-      printf ("name = \"%s\", opencount = %d\n",                             \
-             map->l_name, (int) map->l_opencount);                           \
+      printf ("name = \"%s\", direct_opencount = %d\n",                              \
+             map->l_name, (int) map->l_direct_opencount);                    \
   fflush (stdout)
 
 int