radeon/llvm: Free elf_buffer after use
authorAaron Watry <awatry@gmail.com>
Thu, 14 Nov 2013 18:17:44 +0000 (12:17 -0600)
committerTom Stellard <thomas.stellard@amd.com>
Fri, 15 Nov 2013 17:53:31 +0000 (09:53 -0800)
Prevents a memory leak.

v2: Remove null check

CC: "10.0" <mesa-stable@lists.freedesktop.org>
src/gallium/drivers/radeon/radeon_llvm_emit.c

index d2e5642f0c4cc65dc64ca6018a8ad8299f386296..92e7dbc7756a22956d388d0339e09d74c2df4e21 100644 (file)
@@ -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;