diff options
author | Ulrich Drepper <drepper@redhat.com> | 2008-06-12 04:52:39 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2008-06-12 04:52:39 +0000 |
commit | 9ad58cc3ba614e13af5a6f3810f9b115899eb2ca (patch) | |
tree | 4c9eb1babf38f281adcc2cf80d08dbf7b648930d /nscd/mem.c | |
parent | c128355211141f304e9257dc6d16b73ab57a1fd0 (diff) | |
download | glibc-9ad58cc3ba614e13af5a6f3810f9b115899eb2ca.zip glibc-9ad58cc3ba614e13af5a6f3810f9b115899eb2ca.tar.gz glibc-9ad58cc3ba614e13af5a6f3810f9b115899eb2ca.tar.bz2 |
* nscd/mem.c (gc): Initialize obstack earlier so that if we jump
out we don't use uninitialized memory.
* nscd/hstcache.c (cache_addhst): Send correct number of bytes to
the client.
Diffstat (limited to 'nscd/mem.c')
-rw-r--r-- | nscd/mem.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -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) { |