From afa47c5a261e0a52b52b1e66034237dff80bc0f4 Mon Sep 17 00:00:00 2001 From: Gordon Henriksen Date: Tue, 15 Jan 2008 20:02:11 +0000 Subject: [PATCH] Fix a memory correctness error noticed by valgrind (harmless in practice). 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/llvm/Support/StringPool.h b/include/llvm/Support/StringPool.h index 1f3d8a0f0a7..8661f60e2ef 100644 --- a/include/llvm/Support/StringPool.h +++ b/include/llvm/Support/StringPool.h @@ -110,7 +110,7 @@ namespace llvm { return; if (--S->getValue().Refcount == 0) { S->getValue().Pool->InternTable.remove(S); - delete S; + S->Destroy(); } S = 0; }