[Mesa-dev] [PATCH] r600g: Close a memory leak of llvm byte streams

Tom Stellard tom at stellard.net
Mon Sep 17 16:42:19 PDT 2012


Pushed. Thanks!

On Mon, Sep 17, 2012 at 04:35:06PM +0800, Xinya Zhang wrote:
> Hi all.
> 
> This fixes a memory leak of byte streams allocated in r600_llvm_compile.
> 
> No regressions found in the tests of opencl-example/run_tests.sh.
> 
> signed-off-by: Xinya Zhang <zxy_thf at hotmail.com>
> ---
>  src/gallium/drivers/r600/r600_shader.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c
> index 655f89d..de5a318 100644
> --- a/src/gallium/drivers/r600/r600_shader.c
> +++ b/src/gallium/drivers/r600/r600_shader.c
> @@ -267,6 +267,7 @@ int r600_compute_shader_create(struct pipe_context * ctx,
>  	if (dump) {
>  		r600_bytecode_dump(shader_ctx.bc);
>  	}
> +	free(bytes);
>  	return 1;
>  }
>  
> -- 
> 1.7.11.4
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list