From e73c5501b2fe20290d1b691c85a5d82ac3a0431c Mon Sep 17 00:00:00 2001 From: Jerome Glisse Date: Thu, 2 Sep 2010 11:32:32 -0400 Subject: r600g: fix memory/bo leak Signed-off-by: Jerome Glisse --- src/gallium/winsys/r600/drm/radeon_ctx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/gallium/winsys') diff --git a/src/gallium/winsys/r600/drm/radeon_ctx.c b/src/gallium/winsys/r600/drm/radeon_ctx.c index 50c5e4741e..47fca76136 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) -- cgit v1.2.3