aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nv50/nv50_pc_regalloc.c
diff options
context:
space:
mode:
authorChristoph Bumiller <[email protected]>2010-09-12 00:56:16 +0200
committerChristoph Bumiller <[email protected]>2010-09-12 00:59:49 +0200
commitfc31a25afa2d28dea9bbda08ce8deab5aa96b684 (patch)
treebd84522c05abdc54f295e8a479caa002809d913e /src/gallium/drivers/nv50/nv50_pc_regalloc.c
parent7a4a537be1460b09b192fdf4d92680aad6c9e951 (diff)
nv50: minor compiler fixes and cleanups
Diffstat (limited to 'src/gallium/drivers/nv50/nv50_pc_regalloc.c')
-rw-r--r--src/gallium/drivers/nv50/nv50_pc_regalloc.c5
1 files changed, 5 insertions, 0 deletions
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;
}