[PATCH] D37750: [llvm-objdump] Fix memory leaks in macho dump

Francis Ricci via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 25 14:03:26 PDT 2017


I'm probably not the best resource on the xar apis, I was just fixing
the memory leaks I found with LSan. However, I did look at the API and
don't see anything that suggests RAII, and I don't see any other open
source code not using manual frees.

On Mon, Sep 25, 2017 at 4:52 PM, David Blaikie <dblaikie at gmail.com> wrote:
> Ping
>
> On Mon, Sep 18, 2017 at 11:30 AM David Blaikie via Phabricator via
> llvm-commits <llvm-commits at lists.llvm.org> wrote:
>>
>> dblaikie added inline comments.
>>
>>
>> ================
>> Comment at: llvm/trunk/tools/llvm-objdump/MachODump.cpp:5884
>>      outs() << "\n";
>> +    xar_iter_free(xp);
>>    }
>> ----------------
>> Any chance of an RAII API for this resource, to avoid the accident-prone
>> manual cleanup/free?
>>
>>
>> Repository:
>>   rL LLVM
>>
>> https://reviews.llvm.org/D37750
>>
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits


More information about the llvm-commits mailing list