diff --git a/src/gallium/auxiliary/util/u_transfer_helper.c b/src/gallium/auxiliary/util/u_transfer_helper.c index b7bd43fd97f..033a49b14e2 100644 --- a/src/gallium/auxiliary/util/u_transfer_helper.c +++ b/src/gallium/auxiliary/util/u_transfer_helper.c @@ -511,6 +511,8 @@ u_transfer_helper_transfer_unmap(struct pipe_context *pctx, helper->vtbl->transfer_unmap(pctx, trans->trans2); } + pipe_resource_reference(&ptrans->resource, NULL); + free(trans->staging); free(trans); } else {