summaryrefslogtreecommitdiff
path: root/malloc
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2009-07-02 03:30:55 -0700
committerPetr Baudis <pasky@suse.cz>2009-07-16 17:44:48 +0200
commit51da0dcf515bd63d44dd4c479147810b4f30a7f5 (patch)
tree5938d77903752465da2a241d02fc3fe822288ab2 /malloc
parent870a58b0b6a05589a56ea3dc7ee7b59ed64dee50 (diff)
Fix possible race when freeing object in fast bin list.
(cherry picked from commit 6cbbaa50aac809ad6e0692247876c82d58e466bf)
Diffstat (limited to 'malloc')
-rw-r--r--malloc/malloc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/malloc/malloc.c b/malloc/malloc.c
index 0b9facefd4..703dcb56e7 100644
--- a/malloc/malloc.c
+++ b/malloc/malloc.c
@@ -4802,6 +4802,7 @@ _int_free(mstate av, mchunkptr p)
goto errout;
}
p->fd = fd = old;
+ atomic_full_barrier ();
}
while ((old = catomic_compare_and_exchange_val_acq (fb, p, fd)) != fd);
#else