nv30: Fix memory leak.
authorVinson Lee <vlee@freedesktop.org>
Fri, 1 Feb 2013 07:37:41 +0000 (23:37 -0800)
committerVinson Lee <vlee@freedesktop.org>
Sat, 2 Feb 2013 06:50:26 +0000 (22:50 -0800)
Fixes resource leak defect reported by Coverity.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/gallium/drivers/nv30/nv30_vbo.c

index 128457f7aa903162c6bfe533ae6f10462b349dd0..d7a774fab27300e7b0dac87d7f9016cb7ab5cceb 100644 (file)
@@ -278,6 +278,7 @@ nv30_vertex_state_create(struct pipe_context *pipe, unsigned num_elements,
             case 4: fmt = PIPE_FORMAT_R32G32B32A32_FLOAT; break;
             default:
                 assert(0);
+                FREE(so);
                 return NULL;
             }
             so->element[i].state = nv30_vtxfmt(pipe->screen, fmt)->hw;