From: Aaron Watry Date: Thu, 14 Nov 2013 18:17:44 +0000 (-0600) Subject: radeon/llvm: Free elf_buffer after use X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2be85e2492b6ad7e04884525904a7ec22cde0ddc;p=mesa.git radeon/llvm: Free elf_buffer after use Prevents a memory leak. v2: Remove null check CC: "10.0" --- diff --git a/src/gallium/drivers/radeon/radeon_llvm_emit.c b/src/gallium/drivers/radeon/radeon_llvm_emit.c index d2e5642f0c4..92e7dbc7756 100644 --- a/src/gallium/drivers/radeon/radeon_llvm_emit.c +++ b/src/gallium/drivers/radeon/radeon_llvm_emit.c @@ -176,6 +176,7 @@ unsigned radeon_llvm_compile(LLVMModuleRef M, struct radeon_llvm_binary *binary, if (elf){ elf_end(elf); } + FREE(elf_buffer); LLVMDisposeMemoryBuffer(out_buffer); LLVMDisposeTargetMachine(tm); return 0;