From 81582e9366497d8674ae342d3d72224fbf514fb9 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Fri, 7 Jun 2019 01:16:16 -0700 Subject: [PATCH] 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 --- src/gallium/auxiliary/util/u_transfer_helper.c | 1 + 1 file changed, 1 insertion(+) 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); -- 2.30.2