Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit b203c17e authored by Kevin Funk's avatar Kevin Funk

Fix potential leak in nodehelper

ASAN trace:
Indirect leak of 48 byte(s) in 2 object(s) allocated from:
    #0 0x52a000 in operator new(unsigned long) (/home/kfunk/devel/install/kf5/bin/kmail+0x52a000)
    #1 0x7fbadd2548fb in MimeTreeParser::NodeHelper::removeTempFiles() /home/kfunk/devel/src/kf5/messagelib/mimetreeparser/src/nodehelper.cpp:340:27
    #2 0x7fbaddf8b7ac in MessageViewer::ViewerPrivate::parseContent(KMime::Content*) /home/kfunk/devel/src/kf5/messagelib/messageviewer/src/viewer/viewer_p.cpp:904:18
    #3 0x7fbaddf8b1c6 in MessageViewer::ViewerPrivate::displayMessage() /home/kfunk/devel/src/kf5/messagelib/messageviewer/src/viewer/viewer_p.cpp:885:5
    ...
parent 3728ca38
......@@ -337,7 +337,7 @@ void NodeHelper::removeTempFiles()
{
//Don't delete as it will be deleted in class
mAttachmentFilesDir->removeTempFiles();
mAttachmentFilesDir = new AttachmentTemporaryFilesDirs();
mAttachmentFilesDir = new AttachmentTemporaryFilesDirs(this);
}
void NodeHelper::addTempFile(const QString &file)
......
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