From 51f79d5c67f7ce04c9d715195b6151bfe6b1cb21 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Sat, 6 Nov 1999 00:14:25 +0000 Subject: [PATCH] fixed memory leak in wxFilesystemHandler git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4381 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/filesys.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/common/filesys.cpp b/src/common/filesys.cpp index 24e5687e6d..96ae68773e 100644 --- a/src/common/filesys.cpp +++ b/src/common/filesys.cpp @@ -97,8 +97,14 @@ wxString wxFileSystemHandler::GetMimeTypeFromExt(const wxString& location) } ft = m_MimeMng -> GetFileTypeFromExtension(ext); - if (ft && (ft -> GetMimeType(&mime))) return mime; - else return wxEmptyString; + if (ft && (ft -> GetMimeType(&mime))) { + delete ft; + return mime; + } + else { + delete ft; + return wxEmptyString; + } } -- 2.45.2