[Mesa-dev] [PATCH 3/6] nv50: Fix memory leak.

Vinson Lee vlee at freedesktop.org
Thu Jan 31 23:50:32 PST 2013


Fixes resource leak defect reported by Coverity.

Signed-off-by: Vinson Lee <vlee at freedesktop.org>
---
 src/gallium/drivers/nv50/nv50_vbo.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/gallium/drivers/nv50/nv50_vbo.c b/src/gallium/drivers/nv50/nv50_vbo.c
index 6e81b7b..d050062 100644
--- a/src/gallium/drivers/nv50/nv50_vbo.c
+++ b/src/gallium/drivers/nv50/nv50_vbo.c
@@ -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;
-- 
1.8.0



More information about the mesa-dev mailing list