about summary refs log tree commit diff
path: root/nscd/nscd-client.h
diff options
context:
space:
mode:
Diffstat (limited to 'nscd/nscd-client.h')
-rw-r--r--nscd/nscd-client.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/nscd/nscd-client.h b/nscd/nscd-client.h
index fee2a15dcc..ca9e6def1a 100644
--- a/nscd/nscd-client.h
+++ b/nscd/nscd-client.h
@@ -421,7 +421,7 @@ __nscd_drop_map_ref (struct mapped_database *map, int *gc_cycle)
 	  return -1;
 	}
 
-      if (atomic_decrement_val (&map->counter) == 0)
+      if (atomic_fetch_add_relaxed (&map->counter, -1) == 1)
 	__nscd_unmap (map);
     }