summaryrefslogtreecommitdiff
path: root/src/gallium
diff options
context:
space:
mode:
authorAaron Watry <awatry@gmail.com>2013-11-14 12:17:44 -0600
committerIan Romanick <ian.d.romanick@intel.com>2013-11-15 13:39:41 -0800
commit3fd32619d7143ed7db21fa402d38e681520f82c2 (patch)
treeda9c671845ac4e2bc10cc2a20dd1f0cbd1b80c75 /src/gallium
parent7a87dc278e5b521ed6d4e30afa24bcc54df72d2e (diff)
radeon/llvm: Free elf_buffer after use
Prevents a memory leak. v2: Remove null check CC: "10.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 2be85e2492b6ad7e04884525904a7ec22cde0ddc)
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/radeon/radeon_llvm_emit.c1
1 files changed, 1 insertions, 0 deletions
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;