[lld] r287714 - Fix memory leak detected by asan.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 22 15:13:09 PST 2016


Author: ruiu
Date: Tue Nov 22 17:13:08 2016
New Revision: 287714

URL: http://llvm.org/viewvc/llvm-project?rev=287714&view=rev
Log:
Fix memory leak detected by asan.

Modified:
    lld/trunk/ELF/SyntheticSections.cpp

Modified: lld/trunk/ELF/SyntheticSections.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/SyntheticSections.cpp?rev=287714&r1=287713&r2=287714&view=diff
==============================================================================
--- lld/trunk/ELF/SyntheticSections.cpp (original)
+++ lld/trunk/ELF/SyntheticSections.cpp Tue Nov 22 17:13:08 2016
@@ -221,7 +221,7 @@ MipsOptionsSection<ELFT> *MipsOptionsSec
   };
 
   if (Create)
-    return new MipsOptionsSection<ELFT>(Reginfo);
+    return make<MipsOptionsSection<ELFT>>(Reginfo);
   return nullptr;
 }
 




More information about the llvm-commits mailing list