mirror of
https://invent.kde.org/system/dolphin
synced 2024-10-28 03:21:56 +00:00
Fixes small memory leak in DolphinContextMenu
Summary: When DolphinContextMenu::baseFileItem is called a KFileItem is allocated and stored in DolphinContextMenu::m_baseFileItem, which is of type KFileItem*, but the destructor failed to delete this. Test Plan: This leak was found using Address Sanitizer Reviewers: broulik, elvisangelaccio Reviewed By: broulik, elvisangelaccio Subscribers: ngraham, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D14178
This commit is contained in:
parent
e6bf758406
commit
f186124f0e
|
@ -81,6 +81,8 @@ DolphinContextMenu::DolphinContextMenu(DolphinMainWindow* parent,
|
||||||
|
|
||||||
DolphinContextMenu::~DolphinContextMenu()
|
DolphinContextMenu::~DolphinContextMenu()
|
||||||
{
|
{
|
||||||
|
delete m_baseFileItem;
|
||||||
|
m_baseFileItem = nullptr;
|
||||||
delete m_selectedItemsProperties;
|
delete m_selectedItemsProperties;
|
||||||
m_selectedItemsProperties = nullptr;
|
m_selectedItemsProperties = nullptr;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue