radeonsi: check that we don't leak fine.buf references
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Tue, 14 Nov 2017 08:37:38 +0000 (09:37 +0100)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Tue, 28 Nov 2017 08:34:43 +0000 (09:34 +0100)
Just as an added precaution.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/drivers/radeonsi/si_fence.c

index b835ed649eeace21ac18da0e4dd5af23573991ce..61105217caab63f7e0a28da01d9c17af7878d560 100644 (file)
@@ -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)