diff options
-rw-r--r-- | ui/qt/main_window.cpp | 10 | ||||
-rw-r--r-- | wireshark-qt.cpp | 1 |
2 files changed, 11 insertions, 0 deletions
diff --git a/ui/qt/main_window.cpp b/ui/qt/main_window.cpp index 1d1e9eb24b..e7fcc99032 100644 --- a/ui/qt/main_window.cpp +++ b/ui/qt/main_window.cpp @@ -736,6 +736,16 @@ MainWindow::MainWindow(QWidget *parent) : MainWindow::~MainWindow() { + disconnect(main_ui_->mainStack, 0, 0, 0); + +#ifndef Q_OS_MAC + // file_set_dialog_ is a subclass of GeometryStateDialog. + // For reasons described in geometry_state_dialog.h no parent is set when + // instantiating the dialog and as a result the object is not automatically + // freed by its parent. Free it here explicitly to avoid leak and numerous + // Valgrind complaints. + delete file_set_dialog_; +#endif delete main_ui_; } diff --git a/wireshark-qt.cpp b/wireshark-qt.cpp index 61fac58a59..538994daef 100644 --- a/wireshark-qt.cpp +++ b/wireshark-qt.cpp @@ -939,6 +939,7 @@ int main(int argc, char *qt_argv[]) ret_val = wsApp->exec(); + delete main_w; recent_cleanup(); epan_cleanup(); |