about summary refs log tree commit diff
path: root/nscd/mem.c
diff options
context:
space:
mode:
Diffstat (limited to 'nscd/mem.c')
-rw-r--r--nscd/mem.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/nscd/mem.c b/nscd/mem.c
index 96ff03f0df..e821729dab 100644
--- a/nscd/mem.c
+++ b/nscd/mem.c
@@ -235,6 +235,11 @@ gc (struct database_dyn *db)
   /* Sort the entries by their address.  */
   qsort (he, cnt, sizeof (struct hashentry *), sort_he);
 
+#define obstack_chunk_alloc xmalloc
+#define obstack_chunk_free free
+  struct obstack ob;
+  obstack_init (&ob);
+
   /* Determine the highest used address.  */
   size_t high = nmark;
   while (high > 0 && mark[high - 1] == 0)
@@ -307,10 +312,6 @@ gc (struct database_dyn *db)
     size_t size;
     struct moveinfo *next;
   } *moves = NULL;
-#define obstack_chunk_alloc xmalloc
-#define obstack_chunk_free free
-  struct obstack ob;
-  obstack_init (&ob);
 
   while (byte < high)
     {