mesa: fix error handling in get_tex_rgba_compressed()
authorBrian Paul <brianp@vmware.com>
Thu, 9 Feb 2012 03:10:15 +0000 (20:10 -0700)
committerBrian Paul <brianp@vmware.com>
Fri, 10 Feb 2012 15:06:57 +0000 (08:06 -0700)
src/mesa/main/texgetimage.c

index 8bbea831c31b09c0746f2a88ba780d4f88766012..a02a491569557abcb646a2e3c90b2bcc2a3a7c6e 100644 (file)
@@ -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;
       }
    }