Module: Mesa Branch: master Commit: bc11deb86d8bc037d842a04f8782461a5472ecf1 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=bc11deb86d8bc037d842a04f8782461a5472ecf1
Author: Tomeu Vizoso <[email protected]> Date: Mon Apr 27 16:09:02 2020 +0200 panfrost: Don't leak temporary descriptors array As found by Coverity: >>> CID 1462596: Resource leaks (RESOURCE_LEAK) >>> Variable "descriptors" going out of scope leaks the storage it points >>> to. Signed-off-by: Tomeu Vizoso <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4724> --- src/gallium/drivers/panfrost/pan_cmdstream.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gallium/drivers/panfrost/pan_cmdstream.c b/src/gallium/drivers/panfrost/pan_cmdstream.c index 439a09ca54c..4146c8c6742 100644 --- a/src/gallium/drivers/panfrost/pan_cmdstream.c +++ b/src/gallium/drivers/panfrost/pan_cmdstream.c @@ -1328,6 +1328,8 @@ panfrost_emit_texture_descriptors(struct panfrost_batch *batch, descriptors, sizeof(struct bifrost_texture_descriptor) * ctx->sampler_view_count[stage]); + + free(descriptors); } else { uint64_t trampolines[PIPE_MAX_SHADER_SAMPLER_VIEWS]; _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
