X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/13e3b45a89c7a58ada9e051ed3ade96ded8e141e..2035e10e83324c6925d12725b842768f6e2b00a2:/src/unix/mimetype.cpp diff --git a/src/unix/mimetype.cpp b/src/unix/mimetype.cpp index 3e74741551..e2a0e1d834 100644 --- a/src/unix/mimetype.cpp +++ b/src/unix/mimetype.cpp @@ -138,6 +138,11 @@ public: { m_next = NULL; } + + ~MailCapEntry() + { + if (m_next) delete m_next; + } // accessors const wxString& GetOpenCmd() const { return m_openCmd; } @@ -1041,6 +1046,14 @@ wxMimeTypesManagerImpl::wxMimeTypesManagerImpl() handlers[hn]->GetMimeInfoRecords(this); } + +wxMimeTypesManagerImpl::~wxMimeTypesManagerImpl() +{ + size_t cnt = m_aEntries.GetCount(); + for (size_t i = 0; i < cnt; i++) delete m_aEntries[i]; +} + + wxFileType * wxMimeTypesManagerImpl::GetFileTypeFromExtension(const wxString& ext) { @@ -1251,8 +1264,9 @@ bool wxMimeTypesManagerImpl::ReadMimeTypes(const wxString& strFileName) } } else { - // unquoted string ends at the first space - for ( pEnd = pc; !wxIsspace(*pEnd); pEnd++ ) + // unquoted string ends at the first space or at the end of + // line + for ( pEnd = pc; *pEnd && !wxIsspace(*pEnd); pEnd++ ) ; }