nv50/ir: Free target if we failed to create a program
Signed-off-by: Pierre Moreau <pierre.morrow@free.fr> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
This commit is contained in:

committed by
Ilia Mirkin

parent
b490ca9a38
commit
dd7ab4dcb4
@@ -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;
|
||||
|
Reference in New Issue
Block a user