[Mesa-dev] [PATCH 3/3] mesa: fix error handling in get_tex_rgba_compressed()

Brian Paul brianp at vmware.com
Wed Feb 8 19:10:25 PST 2012


---
 src/mesa/main/texgetimage.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/mesa/main/texgetimage.c b/src/mesa/main/texgetimage.c
index 8bbea83..a02a491 100644
--- a/src/mesa/main/texgetimage.c
+++ b/src/mesa/main/texgetimage.c
@@ -259,6 +259,8 @@ get_tex_rgba_compressed(struct gl_context *ctx, GLuint dimensions,
       }
       else {
          _mesa_error(ctx, GL_OUT_OF_MEMORY, "glGetTexImage");
+         free(tempImage);
+         return;
       }
    }
 
-- 
1.7.3.4



More information about the mesa-dev mailing list