Module: Mesa
Branch: master
Commit: e52e8326d9131670880d4b6fa285d49c7e1d7fee
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=e52e8326d9131670880d4b6fa285d49c7e1d7fee

Author: Nicolai Hähnle <nicolai.haeh...@amd.com>
Date:   Tue Nov 14 09:37:38 2017 +0100

radeonsi: check that we don't leak fine.buf references

Just as an added precaution.

Reviewed-by: Marek Olšák <marek.ol...@amd.com>

---

 src/gallium/drivers/radeonsi/si_fence.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/gallium/drivers/radeonsi/si_fence.c 
b/src/gallium/drivers/radeonsi/si_fence.c
index b835ed649e..61105217ca 100644
--- a/src/gallium/drivers/radeonsi/si_fence.c
+++ b/src/gallium/drivers/radeonsi/si_fence.c
@@ -445,12 +445,14 @@ static void si_flush_from_st(struct pipe_context *ctx,
                }
 
                multi_fence->fine = fine;
+               fine.buf = NULL;
 
                if (flags & TC_FLUSH_ASYNC) {
                        util_queue_fence_signal(&multi_fence->ready);
                        
tc_unflushed_batch_token_reference(&multi_fence->tc_token, NULL);
                }
        }
+       assert(!fine.buf);
 finish:
        if (!(flags & PIPE_FLUSH_DEFERRED)) {
                if (rctx->dma.cs)

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to