]> git.saurik.com Git - wxWidgets.git/commitdiff
Use correct delete[] for a buffer allocated with new[].
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 2 Jan 2011 22:04:18 +0000 (22:04 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 2 Jan 2011 22:04:18 +0000 (22:04 +0000)
Fix mismatch between scalar new and array delete in GetPathForIconFile() in
wxOSX wxMimeTypeManager code.

Closes #12826.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66525 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/osx/core/mimetype.cpp

index fcc076a7d8962f3ea708fbc030517f3b3d5ba2f9..5a6e534d5abc56950f6c5d080b2def6834235237 100644 (file)
@@ -199,7 +199,7 @@ wxString GetPathForIconFile( CFBundleRef bundle, CFStringRef iconFile )
         OSStatus status = LSGetExtensionInfo( wholeString.length, buffer, &periodIndex );
 
         // Deallocate the buffer
-        delete buffer;
+        delete [] buffer;
 
         // If the period could not be located it will not be possible to get the URL
         if( status != noErr || periodIndex == kLSInvalidExtensionIndex )