swrast: Fix memory leak in out-of-memory path.
authorVinson Lee <vlee@vmware.com>
Tue, 25 Oct 2011 17:08:59 +0000 (10:08 -0700)
committerVinson Lee <vlee@vmware.com>
Tue, 25 Oct 2011 18:09:45 +0000 (11:09 -0700)
Fixes Coverity resource leak defect.

Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/swrast/s_texcombine.c

index c67c356..a7cbb44 100644 (file)
@@ -108,6 +108,7 @@ texture_combine( struct gl_context *ctx, GLuint unit, GLuint n,
             i--;
          }
          _mesa_error(ctx, GL_OUT_OF_MEMORY, "texture_combine");
+         free(rgba);
          return;
       }
    }