summaryrefslogtreecommitdiff
path: root/malloc
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2008-01-09 21:52:40 +0000
committerUlrich Drepper <drepper@redhat.com>2008-01-09 21:52:40 +0000
commitf6bacb8ef4dfcee39864d6383e3660d8ac267d23 (patch)
tree44358c8479ad58985dd4270f7a7910c58d62e742 /malloc
parentaa693c68be9fc19b88bef6806c77b8b4afa7a438 (diff)
downloadglibc-f6bacb8ef4dfcee39864d6383e3660d8ac267d23.tar.gz
[BZ #5541]
* sunrpc/rpc_thread.c (__rpc_thread_destroy): Also free xports and pollfd structures. Patch by André Cruz.
Diffstat (limited to 'malloc')
-rw-r--r--malloc/malloc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/malloc/malloc.c b/malloc/malloc.c
index f0425bddf5..17dd0a9c96 100644
--- a/malloc/malloc.c
+++ b/malloc/malloc.c
@@ -3772,8 +3772,9 @@ public_mEMALIGn(size_t alignment, size_t bytes)
} else {
#if USE_ARENAS
/* ... or sbrk() has failed and there is still a chance to mmap() */
- ar_ptr = arena_get2(ar_ptr->next ? ar_ptr : 0, bytes);
+ mstate prev = ar_ptr->next ? ar_ptr : 0;
(void)mutex_unlock(&ar_ptr->mutex);
+ ar_ptr = arena_get2(prev, bytes);
if(ar_ptr) {
p = _int_memalign(ar_ptr, alignment, bytes);
(void)mutex_unlock(&ar_ptr->mutex);