Mesa (master): radeonsi: Release storage for smda_uploads when the context is destroyed
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Sep 6 08:00:50 UTC 2019
Module: Mesa
Branch: master
Commit: 9b9e1de90e859be950ebf7e0ac5a414728f48aac
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=9b9e1de90e859be950ebf7e0ac5a414728f48aac
Author: Gert Wollny <gert.wollny at collabora.com>
Date: Tue Sep 3 19:24:09 2019 +0200
radeonsi: Release storage for smda_uploads when the context is destroyed
This fixes a memory leak in the flush code:
Direct leak of 128 byte(s) in 1 object(s) allocated from:
#0 in __interceptor_realloc .../gcc-8.3.0/libsanitizer/asan/asan_malloc_linux.cc:105
#1 in si_buffer_do_flush_region src/gallium/drivers/radeonsi/si_buffer.c:573
#2 in si_buffer_flush_region src/gallium/drivers/radeonsi/si_buffer.c:608
#3 in si_buffer_flush_region src/gallium/drivers/radeonsi/si_buffer.c:597
Signed-off-by: Gert Wollny <gert.wollny at collabora.com>
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
---
src/gallium/drivers/radeonsi/si_pipe.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c
index 487d9254a6b..e477b7ba002 100644
--- a/src/gallium/drivers/radeonsi/si_pipe.c
+++ b/src/gallium/drivers/radeonsi/si_pipe.c
@@ -294,6 +294,7 @@ static void si_destroy_context(struct pipe_context *context)
util_dynarray_fini(&sctx->resident_img_needs_color_decompress);
util_dynarray_fini(&sctx->resident_tex_needs_depth_decompress);
si_unref_sdma_uploads(sctx);
+ free(sctx->sdma_uploads);
FREE(sctx);
}
More information about the mesa-commit
mailing list