[llvm] 96c4460 - [ARM][MachineOutliner] Fix memory leak.

Yvan Roux via llvm-commits llvm-commits at lists.llvm.org
Fri May 15 07:27:41 PDT 2020


Author: Yvan Roux
Date: 2020-05-15T16:27:14+02:00
New Revision: 96c4460a0be6f5f66a02eac7fe796e49768001a4

URL: https://github.com/llvm/llvm-project/commit/96c4460a0be6f5f66a02eac7fe796e49768001a4
DIFF: https://github.com/llvm/llvm-project/commit/96c4460a0be6f5f66a02eac7fe796e49768001a4.diff

LOG: [ARM][MachineOutliner] Fix memory leak.

Fix sanitizer bots after 0e4827aa4e4ae25813f66d3b872db67d93813009

Added: 
    

Modified: 
    llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp b/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
index c160843fcdba..20df55f55bc8 100644
--- a/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
+++ b/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
@@ -5668,6 +5668,7 @@ outliner::OutlinedFunction ARMBaseInstrInfo::getOutliningCandidateInfo(
   } else
     return outliner::OutlinedFunction();
 
+  delete Costs;
   return outliner::OutlinedFunction(RepeatedSequenceLocs, SequenceSize,
                                     NumBytesToCreateFrame, FrameID);
 }


        


More information about the llvm-commits mailing list