From: Kenneth Graunke Date: Fri, 7 Jun 2019 08:16:16 +0000 (-0700) Subject: gallium/u_transfer_helper: Free the staging buffer on unmap. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=81582e9366497d8674ae342d3d72224fbf514fb9;p=mesa.git 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 --- diff --git a/src/gallium/auxiliary/util/u_transfer_helper.c b/src/gallium/auxiliary/util/u_transfer_helper.c index 14c4d56392d..b7bd43fd97f 100644 --- a/src/gallium/auxiliary/util/u_transfer_helper.c +++ b/src/gallium/auxiliary/util/u_transfer_helper.c @@ -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);