From: Mun Gwan-gyeong Date: Wed, 16 Nov 2016 19:17:39 +0000 (+0900) Subject: vc4: Fix resource leak in register allocation failure path. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=20c1623a1107858c43a743dbd24147d978fef7f6;p=mesa.git vc4: Fix resource leak in register allocation failure path. CID 1394322 Signed-off-by: Mun Gwan-gyeong --- 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; }