about summary refs log tree commit diff
path: root/nscd/nscd_initgroups.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2004-11-10 09:02:52 +0000
committerJakub Jelinek <jakub@redhat.com>2004-11-10 09:02:52 +0000
commit3504bb650f48534549bbd0313dc15fa71455e302 (patch)
tree742dd9cbcee1147fb36bcc02816bec415544597e /nscd/nscd_initgroups.c
parentcbf4bcd2b3d53de274548dbf4c28017d1f07d5b2 (diff)
downloadglibc-3504bb650f48534549bbd0313dc15fa71455e302.tar.gz
glibc-3504bb650f48534549bbd0313dc15fa71455e302.tar.xz
glibc-3504bb650f48534549bbd0313dc15fa71455e302.zip
Updated to fedora-glibc-20041110T0839
Diffstat (limited to 'nscd/nscd_initgroups.c')
-rw-r--r--nscd/nscd_initgroups.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/nscd/nscd_initgroups.c b/nscd/nscd_initgroups.c
index ce44f654d7..2ea9e7f862 100644
--- a/nscd/nscd_initgroups.c
+++ b/nscd/nscd_initgroups.c
@@ -29,15 +29,8 @@
 #include "nscd_proto.h"
 
 
-libc_locked_map_ptr (map_handle);
-/* Note that we only free the structure if necessary.  The memory
-   mapping is not removed since it is not visible to the malloc
-   handling.  */
-libc_freeres_fn (gr_map_free)
-{
-  if (map_handle.mapped != NO_MAPPING)
-    free (map_handle.mapped);
-}
+/* We use the same mapping as in nscd_getgr.   */
+libc_locked_map_ptr (extern, __gr_map_handle);
 
 
 int
@@ -50,7 +43,7 @@ __nscd_getgrouplist (const char *user, gid_t group, long int *size,
   /* If the mapping is available, try to search there instead of
      communicating with the nscd.  */
   struct mapped_database *mapped;
-  mapped = __nscd_get_map_ref (GETFDGR, "group", &map_handle, &gc_cycle);
+  mapped = __nscd_get_map_ref (GETFDGR, "group", &__gr_map_handle, &gc_cycle);
 
  retry:;
   const initgr_response_header *initgr_resp = NULL;