aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys/dri/nouveau/nouveau_fence.c
diff options
context:
space:
mode:
authorBen Skeggs <[email protected]>2008-03-21 18:15:58 +1100
committerBen Skeggs <[email protected]>2008-03-21 18:17:12 +1100
commit83e94189c424303fee4218a9d9380fc73b7ba318 (patch)
tree6607aa68c47fab007dd79b727458154bc82c8739 /src/gallium/winsys/dri/nouveau/nouveau_fence.c
parent735ecf5de8587f8e52fe6ffc7f3f17403d140e23 (diff)
nouveau: use saved fence pointer, not head of unsignalled list
It's possible for the unsignalled list head to change during fence_flush. Fixes valgrind complaint exposed by a previous commit.
Diffstat (limited to 'src/gallium/winsys/dri/nouveau/nouveau_fence.c')
-rw-r--r--src/gallium/winsys/dri/nouveau/nouveau_fence.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gallium/winsys/dri/nouveau/nouveau_fence.c b/src/gallium/winsys/dri/nouveau/nouveau_fence.c
index 7714e6f2485..e7b0b4ff079 100644
--- a/src/gallium/winsys/dri/nouveau/nouveau_fence.c
+++ b/src/gallium/winsys/dri/nouveau/nouveau_fence.c
@@ -172,14 +172,13 @@ nouveau_fence_flush(struct nouveau_channel *chan)
nvfence = nouveau_fence(nvchan->fence_head);
if (nvfence->sequence > sequence)
break;
-
nouveau_fence_del_unsignalled(&nvfence->base);
nvfence->signalled = 1;
if (nvfence->signal_cb) {
struct nouveau_fence *fence = NULL;
- nouveau_fence_ref(nvchan->fence_head, &fence);
+ nouveau_fence_ref(&nvfence->base, &fence);
while (nvfence->signal_cb) {
struct nouveau_fence_cb *cb;