From: Henri Verbeet Date: Sun, 5 Dec 2010 17:42:43 +0000 (+0100) Subject: r600g: Cleanup block bo references in r600_context_fini(). X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=308cfb80f553cf76069e2d75023a44d3b933a399;p=mesa.git r600g: Cleanup block bo references in r600_context_fini(). --- diff --git a/src/gallium/winsys/r600/drm/r600_hw_context.c b/src/gallium/winsys/r600/drm/r600_hw_context.c index de228918953..50b7e6d8b2c 100644 --- a/src/gallium/winsys/r600/drm/r600_hw_context.c +++ b/src/gallium/winsys/r600/drm/r600_hw_context.c @@ -618,6 +618,9 @@ void r600_context_fini(struct r600_context *ctx) range = &ctx->range[CTX_RANGE_ID(ctx, offset)]; range->blocks[CTX_BLOCK_ID(ctx, offset)] = NULL; } + for (int k = 1; k <= block->nbo; k++) { + r600_bo_reference(ctx->radeon, &block->reloc[k].bo, NULL); + } free(block); } }