summaryrefslogtreecommitdiff
path: root/src/panfrost/midgard
diff options
context:
space:
mode:
authorVinson Lee <vlee@freedesktop.org>2020-09-24 18:32:49 -0700
committerMarge Bot <eric+marge@anholt.net>2020-09-28 23:14:18 +0000
commit62ba074ff514acd93bd3d4f14864a67f813ccab4 (patch)
tree6e6b019e4587c67eca6fef518a22768d686f73be /src/panfrost/midgard
parent287ef94e242c42f06ef7c2c384f1bbeacb7c2c1c (diff)
pan/mdg: Fix memory leak on error path.
Fix defect reported by Coverity Scan. Resource leak (RESOURCE_LEAK) leaked_storage: Variable l going out of scope leaks the storage it points to. Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com> Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6858>
Diffstat (limited to 'src/panfrost/midgard')
-rw-r--r--src/panfrost/midgard/midgard_ra.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/panfrost/midgard/midgard_ra.c b/src/panfrost/midgard/midgard_ra.c
index 6eb7368d581..1e511ad92c2 100644
--- a/src/panfrost/midgard/midgard_ra.c
+++ b/src/panfrost/midgard/midgard_ra.c
@@ -971,6 +971,7 @@ mir_ra(compiler_context *ctx)
if (spill_node == -1) {
fprintf(stderr, "ERROR: Failed to choose spill node\n");
+ lcra_free(l);
return;
}