fix potential leak in r600_context_init

This commit is contained in:
Tim Wiederhake 2011-01-24 16:59:16 +01:00 committed by Alex Deucher
parent 9d41e5ee46
commit 4102c7c7e2
1 changed files with 2 additions and 1 deletions

View File

@ -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;
}
}