[Mesa-dev] [PATCH 2/4] nv50/ir: Free target if we failed to create a program
Ilia Mirkin
imirkin at alum.mit.edu
Sat May 6 21:49:31 UTC 2017
Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>
On Sat, May 6, 2017 at 5:47 PM, Pierre Moreau <pierre.morrow at free.fr> wrote:
> Signed-off-by: Pierre Moreau <pierre.morrow at free.fr>
> ---
> src/gallium/drivers/nouveau/codegen/nv50_ir.cpp | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir.cpp
> index 1f640a348a..a4b46eb13f 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;
> --
> 2.12.2
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list