[Mesa-dev] [PATCH 1/5] panfrost: Free the instruction object in mir_remove_instruction()

Boris Brezillon boris.brezillon at collabora.com
Tue Aug 27 10:36:40 UTC 2019


To avoid memory leaks.

Signed-off-by: Boris Brezillon <boris.brezillon at collabora.com>
---
 src/panfrost/midgard/compiler.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/panfrost/midgard/compiler.h b/src/panfrost/midgard/compiler.h
index 099d108142b1..f9ba31b5959d 100644
--- a/src/panfrost/midgard/compiler.h
+++ b/src/panfrost/midgard/compiler.h
@@ -315,6 +315,7 @@ static inline void
 mir_remove_instruction(struct midgard_instruction *ins)
 {
         list_del(&ins->link);
+        free(ins);
 }
 
 static inline midgard_instruction*
-- 
2.21.0



More information about the mesa-dev mailing list