gallium/u_transfer_helper: Free the staging buffer on unmap.
u_transfer_helper sometimes mallocs a staging buffer, and leaked it. Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
This commit is contained in:
@@ -511,6 +511,7 @@ u_transfer_helper_transfer_unmap(struct pipe_context *pctx,
|
||||
helper->vtbl->transfer_unmap(pctx, trans->trans2);
|
||||
}
|
||||
|
||||
free(trans->staging);
|
||||
free(trans);
|
||||
} else {
|
||||
helper->vtbl->transfer_unmap(pctx, ptrans);
|
||||
|
||||
Reference in New Issue
Block a user