llvm.org GIT mirror llvm / 4f95bcc
Plug a leak introduced by r240848 Apparently this obvious leak was never exercised before, but r240848 exposed it. Plug it. http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/5075 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240865 91177308-0d34-0410-b5e6-96231b3b80d8 Duncan P. N. Exon Smith 4 years ago
1 changed file(s) with 5 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
19401940 SlotTracker *Machine, const Module *Context,
19411941 bool FromValue) {
19421942 if (const MDNode *N = dyn_cast(MD)) {
1943 if (!Machine)
1944 Machine = new SlotTracker(Context);
1943 std::unique_ptr MachineStorage;
1944 if (!Machine) {
1945 MachineStorage = make_unique(Context);
1946 Machine = MachineStorage.get();
1947 }
19451948 int Slot = Machine->getMetadataSlot(N);
19461949 if (Slot == -1)
19471950 // Give the pointer value instead of "badref", since this comes up all