[Mesa-dev] [PATCH 3/3] radeon/llvm: Free elf_buffer after use
Aaron Watry
awatry at gmail.com
Thu Nov 7 16:08:16 PST 2013
Prevents a memory leak.
---
src/gallium/drivers/radeon/radeon_llvm_emit.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/gallium/drivers/radeon/radeon_llvm_emit.c b/src/gallium/drivers/radeon/radeon_llvm_emit.c
index d2e5642..e35c212 100644
--- a/src/gallium/drivers/radeon/radeon_llvm_emit.c
+++ b/src/gallium/drivers/radeon/radeon_llvm_emit.c
@@ -176,6 +176,9 @@ unsigned radeon_llvm_compile(LLVMModuleRef M, struct radeon_llvm_binary *binary,
if (elf){
elf_end(elf);
}
+ if (elf_buffer){
+ FREE(elf_buffer);
+ }
LLVMDisposeMemoryBuffer(out_buffer);
LLVMDisposeTargetMachine(tm);
return 0;
--
1.8.3.2
More information about the mesa-dev
mailing list