fix memleak in GetForwardRefForGlobal()
authorNuno Lopes <nunoplopes@sapo.pt>
Wed, 15 Oct 2008 12:04:36 +0000 (12:04 +0000)
committerNuno Lopes <nunoplopes@sapo.pt>
Wed, 15 Oct 2008 12:04:36 +0000 (12:04 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57576 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AsmParser/llvmAsmParser.y

index 54694d712cb0030eee43d5768a63c13bc1235ed1..f2e6404d307cc6d0633e55137e7565ad60a330cb 100644 (file)
@@ -140,6 +140,7 @@ static struct PerModuleInfo {
     GlobalValue *Ret = 0;
     if (I != GlobalRefs.end()) {
       Ret = I->second;
+      I->first.second.destroy();
       GlobalRefs.erase(I);
     }
     return Ret;