From 20c1623a1107858c43a743dbd24147d978fef7f6 Mon Sep 17 00:00:00 2001 From: Mun Gwan-gyeong Date: Thu, 17 Nov 2016 04:17:39 +0900 Subject: [PATCH] vc4: Fix resource leak in register allocation failure path. CID 1394322 Signed-off-by: Mun Gwan-gyeong --- 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 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; } -- 2.30.2