nv50: 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:35:26 -08:00
parent 0580f165ed
commit 4cd4deab48

View file

@ -85,6 +85,7 @@ nv50_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 = nv50_format_table[fmt].vtx;