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

Saleem Abdulrasool via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 12 10:51:18 PDT 2017


compnerd accepted this revision.
compnerd added inline comments.
This revision is now accepted and ready to land.


================
Comment at: tools/llvm-objdump/MachODump.cpp:6050
+        char *buffer;
         if (xar_extract_tobuffersz(xar, xf, &buffer, &member_size) == 0) {
 #if 0 // Useful for debugging.
----------------
Ugh, that is a confusing call.  `xar_extract_tobuffersz` will allocate the buffer, so, yeah, the allocation there was unnecessary.


https://reviews.llvm.org/D37750





More information about the llvm-commits mailing list