summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-10-21 18:41:56 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-10-21 18:41:56 (GMT)
commit4943167a6451d7a483a2aacb5f3f2bebb82adf0d (patch)
tree094892bedfa7ff08b1f44d937a3c86c9c66a2537
parent1b58ef2af54456004390a0888c3edf104e3baa99 (diff)
downloadswift-contrib-4943167a6451d7a483a2aacb5f3f2bebb82adf0d.zip
swift-contrib-4943167a6451d7a483a2aacb5f3f2bebb82adf0d.tar.bz2
Fixed memory leak in StreamInitiationParser.
-rw-r--r--Swiften/Parser/PayloadParsers/StreamInitiationParser.cpp3
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;
}
}
}