From 23e09ab1df5dc58311ad2049ef015ed8daae8dc0 Mon Sep 17 00:00:00 2001 From: Kimmo Varis Date: Mon, 3 May 2010 17:08:20 +0000 Subject: [PATCH] BUG: #2991932 delete[] applied to memory allocated by _tcsdup() Spotted by Jochen. --- Src/stringdiffs.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Src/stringdiffs.cpp b/Src/stringdiffs.cpp index c1d1b692d..1825d31fe 100644 --- a/Src/stringdiffs.cpp +++ b/Src/stringdiffs.cpp @@ -49,7 +49,7 @@ void sd_Close() { if (CustomChars) { - delete [] BreakChars; + free(BreakChars); BreakChars = NULL; CustomChars = false; } @@ -61,7 +61,7 @@ void sd_SetBreakChars(const TCHAR *breakChars) assert(Initialized); if (CustomChars) - delete [] BreakChars; + free(BreakChars); CustomChars = true; BreakChars = _tcsdup(breakChars); -- 2.11.0