summaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys
diff options
context:
space:
mode:
authorJerome Glisse <[email protected]>2010-09-02 11:32:32 -0400
committerJerome Glisse <[email protected]>2010-09-02 11:47:30 -0400
commite73c5501b2fe20290d1b691c85a5d82ac3a0431c (patch)
tree2f23b848a81709e9063841c0b36fe3352a0c009a /src/gallium/winsys
parentc9039fdb167865547dc9b3828d69b99209344999 (diff)
r600g: fix memory/bo leak
Signed-off-by: Jerome Glisse <[email protected]>
Diffstat (limited to 'src/gallium/winsys')
-rw-r--r--src/gallium/winsys/r600/drm/radeon_ctx.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gallium/winsys/r600/drm/radeon_ctx.c b/src/gallium/winsys/r600/drm/radeon_ctx.c
index 50c5e4741e1..47fca761368 100644
--- a/src/gallium/winsys/r600/drm/radeon_ctx.c
+++ b/src/gallium/winsys/r600/drm/radeon_ctx.c
@@ -121,8 +121,7 @@ void radeon_ctx_fini(struct radeon_ctx *ctx)
free(ctx->bo);
free(ctx->pm4);
free(ctx->reloc);
- memset(ctx, 0, sizeof(*ctx));
- free(ctx);
+ memset(ctx, 0, sizeof(struct radeon_ctx));
}
static int radeon_ctx_state_bo(struct radeon_ctx *ctx, struct radeon_state *state)