From fc31a25afa2d28dea9bbda08ce8deab5aa96b684 Mon Sep 17 00:00:00 2001 From: Christoph Bumiller Date: Sun, 12 Sep 2010 00:56:16 +0200 Subject: nv50: minor compiler fixes and cleanups --- src/gallium/drivers/nv50/nv50_pc_regalloc.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/gallium/drivers/nv50/nv50_pc_regalloc.c') diff --git a/src/gallium/drivers/nv50/nv50_pc_regalloc.c b/src/gallium/drivers/nv50/nv50_pc_regalloc.c index 2998343db52..b9d5ba5ef67 100644 --- a/src/gallium/drivers/nv50/nv50_pc_regalloc.c +++ b/src/gallium/drivers/nv50/nv50_pc_regalloc.c @@ -888,6 +888,10 @@ nv_pc_pass1(struct nv_pc *pc, struct nv_basic_block *root) ctx->pc = pc; ctx->insns = CALLOC(NV_PC_MAX_INSTRUCTIONS, sizeof(struct nv_instruction *)); + if (!ctx->insns) { + FREE(ctx); + return -1; + } pc->pass_seq++; ret = pass_generate_phi_movs(ctx, root); @@ -941,6 +945,7 @@ nv_pc_pass1(struct nv_pc *pc, struct nv_basic_block *root) NV50_DBGMSG("REGISTER ALLOCATION - leaving\n"); out: + FREE(ctx->insns); FREE(ctx); return ret; } -- cgit v1.2.3