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 <tomeu.vizoso@collabora.com> Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4724>
This commit is contained in:
@@ -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];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user