From: Tim Wiederhake Date: Mon, 24 Jan 2011 15:59:16 +0000 (+0100) Subject: fix potential leak in r600_context_init X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4102c7c7e207dd5753a3f1dfa30adb39e3fb636d;p=mesa.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 f10e2fda6f2..acbe22a950a 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; } }