mesa: fix potential mem leak in generate_mipmap_compressed()

Fixes a coverity warning.

Reviewed-by: Vinson Lee <vlee@vmware.com>
This commit is contained in:
Brian Paul
2011-12-01 16:37:49 -07:00
parent 98ebe833fe
commit 9ec5050898
+1
View File
@@ -2048,6 +2048,7 @@ generate_mipmap_compressed(struct gl_context *ctx, GLenum target,
dstImage = _mesa_get_tex_image(ctx, texObj, target, level + 1);
if (!dstImage) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "generating mipmaps");
free(temp_dst);
return;
}