Revert "Qt: call cleanup from destructor in WiresharkApplication."

Calling cleanup() twice (via exit signal and via destructor) results in a
use-after-free on exit via write_profile_recent.

This reverts commit e47f9fbeb0.

Change-Id: Ic3ca0742c03a345fd8cb7f3f782942872a3057f5
Reviewed-on: https://code.wireshark.org/review/20273
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
This commit is contained in:
Peter Wu 2017-02-25 19:23:39 +00:00 committed by Gerald Combs
parent cd7d159c2e
commit d464d9cb5c
1 changed files with 1 additions and 2 deletions

View File

@ -672,7 +672,6 @@ void WiresharkApplication::cleanup()
qDeleteAll(recent_captures_);
recent_captures_.clear();
free_filter_lists();
}
void WiresharkApplication::itemStatusFinished(const QString filename, qint64 size, bool accessible) {
@ -848,7 +847,7 @@ WiresharkApplication::WiresharkApplication(int &argc, char **argv) :
WiresharkApplication::~WiresharkApplication()
{
this->cleanup();
free_filter_lists();
}
void WiresharkApplication::registerUpdate(register_action_e action, const char *message)