diff options
author | Pierre Moreau <[email protected]> | 2017-05-06 23:47:21 +0200 |
---|---|---|
committer | Ilia Mirkin <[email protected]> | 2017-05-07 10:26:36 -0400 |
commit | dd7ab4dcb4357ee19bf9f0ec4cdc2f8f3502d5c0 (patch) | |
tree | 71fa5f15cf90d4600c81357c5eaf6e95317f8996 /src/gallium | |
parent | b490ca9a387dabc6447a3e8f68a185fdd9852692 (diff) |
nv50/ir: Free target if we failed to create a program
Signed-off-by: Pierre Moreau <[email protected]>
Reviewed-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/nouveau/codegen/nv50_ir.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir.cpp index 1f640a348a5..a4b46eb13f1 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir.cpp @@ -1224,8 +1224,10 @@ nv50_ir_generate_code(struct nv50_ir_prog_info *info) return -1; nv50_ir::Program *prog = new nv50_ir::Program(type, targ); - if (!prog) + if (!prog) { + nv50_ir::Target::destroy(targ); return -1; + } prog->driver = info; prog->dbgFlags = info->dbgFlags; prog->optLevel = info->optLevel; |