Commit 0161e0bb authored by Kevin Funk's avatar Kevin Funk

Fix leak in templateparserjob

ASAN trace
Indirect leak of 176 byte(s) in 2 object(s) allocated from:
    #0 0x52a000 in operator new(unsigned long) (/home/kfunk/devel/install/kf5/bin/kmail+0x52a000)
    #1 0x7fc933d0d3ef in KMime::Content::Content(KMime::Content*) /home/kfunk/devel/src/kf5/kmime/src/kmime_content.cpp:60:13
    #2 0x7fc9386f630e in TemplateParser::TemplateParserJob::createPlainPartContent(QString const&) const /home/kfunk/devel/src/kf5/messagelib/templateparser/src/templateparserjob.cpp:1276:36
    #3 0x7fc9386f5f8d in TemplateParser::TemplateParserJob::addProcessedBodyToMessage(QString const&, QString const&) const /home/kfunk/devel/src/kf5/messagelib/templateparser/src/templateparserjob.cpp:1204:13
    #4 0x7fc9386f43d8 in TemplateParser::TemplateParserJob::slotExtractInfoDone(TemplateParserExtractHtmlInfoResult const&) /home/kfunk/devel/src/kf5/messagelib/templateparser/src/templateparserjob.cpp:1132:5
    ...
parent f9c0cdf5
......@@ -1228,6 +1228,8 @@ void TemplateParserJob::addProcessedBodyToMessage(const QString &plainBody, cons
d->mMsg->setHeader(mainPart->contentTransferEncoding());
d->mMsg->assemble();
d->mMsg->parse();
delete mainPart; // no longer needed
}
KMime::Content *TemplateParserJob::createMultipartMixed(const QVector<KMime::Content *> &attachments, KMime::Content *textPart) const
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment