diff options
| author | David Hallas <[email protected]> | 2018-07-18 16:43:25 -0600 |
|---|---|---|
| committer | Nathaniel Graham <[email protected]> | 2018-07-18 16:48:07 -0600 |
| commit | f186124f0e2c1a2b82687ad394f4df1acf5f8d61 (patch) | |
| tree | b6dfabbd958f04323ec7b1c29442509e02fd67ef | |
| parent | e6bf758406f6e009f860271785c97c29859dd199 (diff) | |
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
| -rw-r--r-- | src/dolphincontextmenu.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/dolphincontextmenu.cpp b/src/dolphincontextmenu.cpp index 7d7d7a408..8fdaab1d0 100644 --- a/src/dolphincontextmenu.cpp +++ b/src/dolphincontextmenu.cpp @@ -81,6 +81,8 @@ DolphinContextMenu::DolphinContextMenu(DolphinMainWindow* parent, DolphinContextMenu::~DolphinContextMenu() { + delete m_baseFileItem; + m_baseFileItem = nullptr; delete m_selectedItemsProperties; m_selectedItemsProperties = nullptr; } |
