diff options
author | Remko Tronçon <git@el-tramo.be> | 2010-10-21 18:41:56 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2010-10-21 18:41:56 (GMT) |
commit | 4943167a6451d7a483a2aacb5f3f2bebb82adf0d (patch) | |
tree | 094892bedfa7ff08b1f44d937a3c86c9c66a2537 /Swiften | |
parent | 1b58ef2af54456004390a0888c3edf104e3baa99 (diff) | |
download | swift-4943167a6451d7a483a2aacb5f3f2bebb82adf0d.zip swift-4943167a6451d7a483a2aacb5f3f2bebb82adf0d.tar.bz2 |
Fixed memory leak in StreamInitiationParser.
Diffstat (limited to 'Swiften')
-rw-r--r-- | Swiften/Parser/PayloadParsers/StreamInitiationParser.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Swiften/Parser/PayloadParsers/StreamInitiationParser.cpp b/Swiften/Parser/PayloadParsers/StreamInitiationParser.cpp index 76925af..6e1082c 100644 --- a/Swiften/Parser/PayloadParsers/StreamInitiationParser.cpp +++ b/Swiften/Parser/PayloadParsers/StreamInitiationParser.cpp @@ -53,6 +53,7 @@ void StreamInitiationParser::handleStartElement(const String& element, const Str currentText.clear(); } else if (inFeature && formParserFactory->canParse(element, ns, attributes)) { + assert(!formParser); formParser = dynamic_cast<FormParser*>(formParserFactory->createPayloadParser()); } } @@ -100,6 +101,8 @@ void StreamInitiationParser::handleEndElement(const String& element, const Strin } } } + delete formParser; + formParser = NULL; } } } |