aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorMun Gwan-gyeong <[email protected]>2016-11-17 04:17:39 +0900
committerEric Anholt <[email protected]>2016-11-16 19:45:01 -0800
commit20c1623a1107858c43a743dbd24147d978fef7f6 (patch)
treeddf8ac39fce574f81788f15d1e53e2a8211c30ed /src/gallium/drivers
parent686dad657f2179f8c5ab985546577b51c8e3f518 (diff)
vc4: Fix resource leak in register allocation failure path.
CID 1394322 Signed-off-by: Mun Gwan-gyeong <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/vc4/vc4_register_allocate.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/drivers/vc4/vc4_register_allocate.c b/src/gallium/drivers/vc4/vc4_register_allocate.c
index 72e453a2809..247467b7a76 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;
}