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 c67c356c1e01f305dcc7c98f17f36073b76d467b..a7cbb4424bed4da12b72020fc4493d2f75bf0a0d 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;
       }
    }