From bbd549205c0e907839146ed24a4adc4c0ac17d57 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Sun, 18 Sep 2022 10:15:31 -0700 Subject: [PATCH] pan/bi: Fix memory leaks. Fix defects reported by Coverity Scan. Resource leak (RESOURCE_LEAK) leaked_storage: Variable used going out of scope leaks the storage it points to. leaked_storage: Variable multiple_uses going out of scope leaks the storage it points to. Fixes: 8fb415fee20 ("pan/bi: Reduce some moves when going out-of-SSA") Signed-off-by: Vinson Lee Part-of: --- src/panfrost/bifrost/bi_ra.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/panfrost/bifrost/bi_ra.c b/src/panfrost/bifrost/bi_ra.c index 5a439e9..b81cfdb 100644 --- a/src/panfrost/bifrost/bi_ra.c +++ b/src/panfrost/bifrost/bi_ra.c @@ -1049,6 +1049,8 @@ bi_out_of_ssa(bi_context *ctx) } } + free(used); + free(multiple_uses); return first_reg; } -- 2.7.4