Mesa (master): gallium/u_transfer_helper: Free the staging buffer on unmap.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sun Jun 9 22:25:10 UTC 2019


Module: Mesa
Branch: master
Commit: 81582e9366497d8674ae342d3d72224fbf514fb9
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=81582e9366497d8674ae342d3d72224fbf514fb9

Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Fri Jun  7 01:16:16 2019 -0700

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 at intel.com>

---

 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);




More information about the mesa-commit mailing list