OSDN Git Service

BUG: #2991932 delete[] applied to memory allocated by _tcsdup()
authorKimmo Varis <kimmov@gmail.com>
Mon, 3 May 2010 17:08:20 +0000 (17:08 +0000)
committerKimmo Varis <kimmov@gmail.com>
Mon, 3 May 2010 17:08:20 +0000 (17:08 +0000)
 Spotted by Jochen.

Src/stringdiffs.cpp

index c1d1b69..1825d31 100644 (file)
@@ -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);