vc4: Fix resource leak in register allocation failure path.
CID 1394322 Signed-off-by: Mun Gwan-gyeong <elongbug@gmail.com>
This commit is contained in:
parent
686dad657f
commit
20c1623a11
|
@ -354,6 +354,7 @@ vc4_register_allocate(struct vc4_context *vc4, struct vc4_compile *c)
|
||||||
*/
|
*/
|
||||||
if (c->fs_threaded) {
|
if (c->fs_threaded) {
|
||||||
c->failed = true;
|
c->failed = true;
|
||||||
|
free(temp_registers);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -383,6 +384,7 @@ vc4_register_allocate(struct vc4_context *vc4, struct vc4_compile *c)
|
||||||
}
|
}
|
||||||
|
|
||||||
c->failed = true;
|
c->failed = true;
|
||||||
|
free(temp_registers);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue