From 3a2ed837ff3ef4f554bc4e48a082b478ed26965f Mon Sep 17 00:00:00 2001 From: Vincent Richard Date: Sun, 15 Jan 2006 11:16:44 +0000 Subject: [PATCH] Fixed memory leaks. --- vmime/net/imap/IMAPParser.hpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/vmime/net/imap/IMAPParser.hpp b/vmime/net/imap/IMAPParser.hpp index d71ecae6..67d919ec 100644 --- a/vmime/net/imap/IMAPParser.hpp +++ b/vmime/net/imap/IMAPParser.hpp @@ -3188,6 +3188,16 @@ public: { public: + media_message() + : m_media_subtype(NULL) + { + } + + ~media_message() + { + delete m_media_subtype; + } + void go(IMAPParser& parser, string& line, string::size_type* currentPos) { DEBUG_ENTER_COMPONENT("media_message"); @@ -4338,6 +4348,12 @@ public: { delete (*it); } + + for (std::vector ::iterator it = m_status_info_list.begin() ; + it != m_status_info_list.end() ; ++it) + { + delete (*it); + } } void go(IMAPParser& parser, string& line, string::size_type* currentPos)