From b622441a8dc47fe33f5677e2baf0253e082bfe4b Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 2 Jan 2011 22:04:18 +0000 Subject: [PATCH] Use correct delete[] for a buffer allocated with new[]. 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osx/core/mimetype.cpp b/src/osx/core/mimetype.cpp index fcc076a7d8..5a6e534d5a 100644 --- a/src/osx/core/mimetype.cpp +++ b/src/osx/core/mimetype.cpp @@ -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 ) -- 2.45.2