From 4102c7c7e207dd5753a3f1dfa30adb39e3fb636d Mon Sep 17 00:00:00 2001 From: Tim Wiederhake Date: Mon, 24 Jan 2011 16:59:16 +0100 Subject: [PATCH] fix potential leak in r600_context_init --- src/gallium/winsys/r600/drm/r600_hw_context.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; } } -- 2.7.4