nvc0: Fix memory leak.

Fixes resource leak defect reported by Coverity.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
Vinson Lee 2013-01-31 23:32:41 -08:00
parent 985e710c0d
commit 0580f165ed
1 changed files with 1 additions and 0 deletions

View File

@ -89,6 +89,7 @@ nvc0_vertex_state_create(struct pipe_context *pipe,
case 4: fmt = PIPE_FORMAT_R32G32B32A32_FLOAT; break;
default:
assert(0);
FREE(so);
return NULL;
}
so->element[i].state = nvc0_format_table[fmt].vtx;