gallium/u_transfer_helper: Don't leak a reference to the resource.
We pipe_resource_reference when handling transfers in map, we need to do a corresponding unreference in unmap. Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user