summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Wiederhake <twied@gmx.net>2011-01-24 16:59:16 +0100
committerAlex Deucher <alexdeucher@gmail.com>2011-01-25 14:18:19 -0500
commit4102c7c7e207dd5753a3f1dfa30adb39e3fb636d (patch)
treebddb0c2f84ea2c47884a18f1b66e9b6ce28e92fa
parent9d41e5ee46d73d4bff0ab78a5d24ec619a0ef894 (diff)
fix potential leak in r600_context_init
-rw-r--r--src/gallium/winsys/r600/drm/r600_hw_context.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/winsys/r600/drm/r600_hw_context.c b/src/gallium/winsys/r600/drm/r600_hw_context.c
index f10e2fda6f..acbe22a950 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;
}
}