Fix a memory correctness error noticed by valgrind (harmless in practice).
authorGordon Henriksen <gordonhenriksen@mac.com>
Tue, 15 Jan 2008 20:02:11 +0000 (20:02 +0000)
committerGordon Henriksen <gordonhenriksen@mac.com>
Tue, 15 Jan 2008 20:02:11 +0000 (20:02 +0000)
Thanks to Duncan Sands for noticing it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46007 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Support/StringPool.h

index 1f3d8a0f0a77a8b12a7a5e395e5c1cf38493270e..8661f60e2ef9665e41ea68c3aec916e19ccdce11 100644 (file)
@@ -110,7 +110,7 @@ namespace llvm {
         return;
       if (--S->getValue().Refcount == 0) {
         S->getValue().Pool->InternTable.remove(S);
-        delete S;
+        S->Destroy();
       }
       S = 0;
     }