From: Vinson Lee Date: Fri, 1 Feb 2013 07:37:41 +0000 (-0800) Subject: nv30: Fix memory leak. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cea341fce84a885643e615827a86de751849f8da;p=mesa.git nv30: Fix memory leak. Fixes resource leak defect reported by Coverity. Signed-off-by: Vinson Lee Reviewed-by: Brian Paul --- diff --git a/src/gallium/drivers/nv30/nv30_vbo.c b/src/gallium/drivers/nv30/nv30_vbo.c index 128457f7aa9..d7a774fab27 100644 --- a/src/gallium/drivers/nv30/nv30_vbo.c +++ b/src/gallium/drivers/nv30/nv30_vbo.c @@ -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;