diff --git a/src/gallium/drivers/asahi/agx_pipe.c b/src/gallium/drivers/asahi/agx_pipe.c index 89c3fe1b8c0..3c50baf47ee 100644 --- a/src/gallium/drivers/asahi/agx_pipe.c +++ b/src/gallium/drivers/asahi/agx_pipe.c @@ -1388,6 +1388,8 @@ agx_destroy_context(struct pipe_context *pctx) drmSyncobjDestroy(dev->fd, ctx->batches.slots[i].syncobj); } + pipe_resource_reference(&ctx->heap, NULL); + ralloc_free(ctx); }