Module: Mesa Branch: master Commit: 9635869d735f44e381788f47585b4eb8ef124683 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=9635869d735f44e381788f47585b4eb8ef124683
Author: Erik Faye-Lund <[email protected]> Date: Wed Sep 5 12:50:18 2018 +0100 virgl: free trans on map-error When we fail to map memory, we should also free trans to avoid leaking memory. Noticed while reading code. Signed-off-by: Erik Faye-Lund <[email protected]> Reviewed-by: Dave Airlie <[email protected]> --- src/gallium/drivers/virgl/virgl_texture.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/drivers/virgl/virgl_texture.c b/src/gallium/drivers/virgl/virgl_texture.c index 150a5ebd8c..71c0e9da7f 100644 --- a/src/gallium/drivers/virgl/virgl_texture.c +++ b/src/gallium/drivers/virgl/virgl_texture.c @@ -195,6 +195,7 @@ static void *virgl_texture_transfer_map(struct pipe_context *ctx, ptr = vs->vws->resource_map(vs->vws, hw_res); if (!ptr) { + slab_free(&vctx->texture_transfer_pool, trans); return NULL; } _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
