Module: Mesa
Branch: master
Commit: 20c1623a1107858c43a743dbd24147d978fef7f6
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=20c1623a1107858c43a743dbd24147d978fef7f6

Author: Mun Gwan-gyeong <[email protected]>
Date:   Thu Nov 17 04:17:39 2016 +0900

vc4: Fix resource leak in register allocation failure path.

CID 1394322

Signed-off-by: Mun Gwan-gyeong <[email protected]>

---

 src/gallium/drivers/vc4/vc4_register_allocate.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/gallium/drivers/vc4/vc4_register_allocate.c 
b/src/gallium/drivers/vc4/vc4_register_allocate.c
index 72e453a..247467b 100644
--- a/src/gallium/drivers/vc4/vc4_register_allocate.c
+++ b/src/gallium/drivers/vc4/vc4_register_allocate.c
@@ -354,6 +354,7 @@ vc4_register_allocate(struct vc4_context *vc4, struct 
vc4_compile *c)
                          */
                         if (c->fs_threaded) {
                                 c->failed = true;
+                                free(temp_registers);
                                 return NULL;
                         }
 
@@ -383,6 +384,7 @@ vc4_register_allocate(struct vc4_context *vc4, struct 
vc4_compile *c)
                 }
 
                 c->failed = true;
+                free(temp_registers);
                 return NULL;
         }
 

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to