From: Tim Wiederhake Date: Mon, 24 Jan 2011 15:59:16 +0000 (+0100) Subject: fix potential leak in r600_context_init X-Git-Tag: mesa-7.11-rc1~2492 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4102c7c7e207dd5753a3f1dfa30adb39e3fb636d;p=platform%2Fupstream%2Fmesa.git fix potential leak in r600_context_init --- diff --git a/src/gallium/winsys/r600/drm/r600_hw_context.c b/src/gallium/winsys/r600/drm/r600_hw_context.c index f10e2fd..acbe22a 100644 --- a/src/gallium/winsys/r600/drm/r600_hw_context.c +++ b/src/gallium/winsys/r600/drm/r600_hw_context.c @@ -637,7 +637,8 @@ int r600_context_init(struct r600_context *ctx, struct radeon *radeon) ctx->range[i].end_offset = ((i + 1) << ctx->hash_shift) - 1; ctx->range[i].blocks = calloc(1 << ctx->hash_shift, sizeof(void*)); if (ctx->range[i].blocks == NULL) { - return -ENOMEM; + r = -ENOMEM; + goto out_err; } }