From: Vadim Zeitlin Date: Tue, 7 Mar 2006 23:32:09 +0000 (+0000) Subject: fixed yet another memory leak in LoadGnomeDataFromKeyFile() (coverity checker CID 51) X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/32592f4a80846246cdb6ea3463c80cc1a55dfef1 fixed yet another memory leak in LoadGnomeDataFromKeyFile() (coverity checker CID 51) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37882 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/unix/mimetype.cpp b/src/unix/mimetype.cpp index ec6d47e5cb..e159a60e7e 100644 --- a/src/unix/mimetype.cpp +++ b/src/unix/mimetype.cpp @@ -646,7 +646,9 @@ void wxMimeTypesManagerImpl::LoadGnomeDataFromKeyFile(const wxString& filename, nLine++; } // end of while, save any data - if (! curMimeType.empty()) + if ( curMimeType.empty() ) + delete entry; + else AddToMimeData( curMimeType, curIconFile, entry, strExtensions, strDesc); }