Mesa (master): swrast: Fix memory leak in out-of-memory path.

Vinson Lee vlee at kemper.freedesktop.org
Tue Oct 25 18:10:02 UTC 2011


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

Author: Vinson Lee <vlee at vmware.com>
Date:   Tue Oct 25 10:08:59 2011 -0700

swrast: Fix memory leak in out-of-memory path.

Fixes Coverity resource leak defect.

Reviewed-by: Brian Paul <brianp at vmware.com>

---

 src/mesa/swrast/s_texcombine.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/mesa/swrast/s_texcombine.c b/src/mesa/swrast/s_texcombine.c
index c67c356..a7cbb44 100644
--- a/src/mesa/swrast/s_texcombine.c
+++ b/src/mesa/swrast/s_texcombine.c
@@ -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;
       }
    }




More information about the mesa-commit mailing list