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>
This commit is contained in:
Vinson Lee
2020-09-24 18:32:49 -07:00
committed by Marge Bot
parent 287ef94e24
commit 62ba074ff5

View File

@@ -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;
}