diff options
author | Erik Faye-Lund <[email protected]> | 2018-09-05 12:50:18 +0100 |
---|---|---|
committer | Erik Faye-Lund <[email protected]> | 2018-09-10 10:35:02 +0200 |
commit | 9635869d735f44e381788f47585b4eb8ef124683 (patch) | |
tree | c60bb0d7ef3c57df7819e2656e83e186d4890fd2 /src | |
parent | 44e3e6a9b403f9325f49684b9baed1854da30cec (diff) |
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]>
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/virgl/virgl_texture.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gallium/drivers/virgl/virgl_texture.c b/src/gallium/drivers/virgl/virgl_texture.c index 150a5ebd8c7..71c0e9da7fd 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; } |