diff options
author | Stig Bjørlykke <stig@bjorlykke.org> | 2015-11-14 19:03:03 +0100 |
---|---|---|
committer | Stig Bjørlykke <stig@bjorlykke.org> | 2015-11-14 18:10:56 +0000 |
commit | 9196fa96edc467b04b68e845eb735c97ed3c8d3a (patch) | |
tree | 9a932214f2b3aaf2a7de91d08737b16fb70cb753 | |
parent | 8faf5c80b3302247c32e1f5c492cb31a082ee0ad (diff) |
Qt: Fixed use-of-deallocated-memory when removing a profile.
The memory used for profile item data is accessed in updateWidgets() which
is called when setting the Default profile as selected. Ensure we free
this memory after this has happened.
Bug: 11705
Change-Id: I79e12d918289e1fcf25331c39439e9c6f3b774d5
Reviewed-on: https://code.wireshark.org/review/11827
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
-rw-r--r-- | ui/qt/profile_dialog.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ui/qt/profile_dialog.cpp b/ui/qt/profile_dialog.cpp index 341a13e035..13715fc371 100644 --- a/ui/qt/profile_dialog.cpp +++ b/ui/qt/profile_dialog.cpp @@ -220,11 +220,12 @@ void ProfileDialog::on_deleteToolButton_clicked() if (profile->is_global || profile->status == PROF_STAT_DEFAULT) { return; } - remove_from_profile_list(fl_entry); delete item; // Select the default pd_ui_->profileTreeWidget->setCurrentItem(pd_ui_->profileTreeWidget->topLevelItem(0)); + + remove_from_profile_list(fl_entry); } } |