Module: Mesa
Branch: master
Commit: 4cd4deab483f3ac18b43dfda626ec6115d35ee26
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=4cd4deab483f3ac18b43dfda626ec6115d35ee26

Author: Vinson Lee <[email protected]>
Date:   Thu Jan 31 23:35:26 2013 -0800

nv50: Fix memory leak.

Fixes resource leak defect reported by Coverity.

Signed-off-by: Vinson Lee <[email protected]>
Reviewed-by: Brian Paul <[email protected]>

---

 src/gallium/drivers/nv50/nv50_vbo.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

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;

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to