mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-23 19:28:11 +02:00
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:
parent
6227e6faee
commit
65e0c4b64f
1 changed files with 2 additions and 0 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue