From 0580f165edee989492e6c6df5f66bffb3233729f Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Thu, 31 Jan 2013 23:32:41 -0800 Subject: [PATCH] nvc0: Fix memory leak. Fixes resource leak defect reported by Coverity. Signed-off-by: Vinson Lee Reviewed-by: Brian Paul --- src/gallium/drivers/nvc0/nvc0_vbo.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/drivers/nvc0/nvc0_vbo.c b/src/gallium/drivers/nvc0/nvc0_vbo.c index 61a6341b852..3ae437a0778 100644 --- a/src/gallium/drivers/nvc0/nvc0_vbo.c +++ b/src/gallium/drivers/nvc0/nvc0_vbo.c @@ -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; -- 2.30.2