panfrost: Free the instruction object in mir_remove_instruction()
authorBoris Brezillon <boris.brezillon@collabora.com>
Tue, 13 Aug 2019 23:54:24 +0000 (01:54 +0200)
committerBoris Brezillon <boris.brezillon@collabora.com>
Tue, 27 Aug 2019 14:50:52 +0000 (16:50 +0200)
To avoid memory leaks.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
src/panfrost/midgard/compiler.h

index 099d108142b1211b0c733009d1c6b1635205b6d7..f9ba31b5959d079d40e28a8b10910920efba7ac2 100644 (file)
@@ -315,6 +315,7 @@ static inline void
 mir_remove_instruction(struct midgard_instruction *ins)
 {
         list_del(&ins->link);
+        free(ins);
 }
 
 static inline midgard_instruction*