aboutsummaryrefslogtreecommitdiffstats
path: root/wireshark-qt.cpp
diff options
context:
space:
mode:
authorMikael Kanstrup <mikael.kanstrup@gmail.com>2017-09-25 23:18:31 +0200
committerMichael Mann <mmann78@netscape.net>2017-09-25 23:37:56 +0000
commita8a3903e55af23bdce550a95ffe14a398fd1204c (patch)
treeba91f9aae0f2970d4834f97dde6d5c558bdea2db /wireshark-qt.cpp
parente2d43e7d4b352206bac6bdd42f2c8f04d1e126b2 (diff)
Qt: Free MainWindow at shutdown
MainWindow is allocated on heap on startup but not freed on shutdown. Free the object at shutdown mainly to silent Valgrind. When at it also fix two problems with the MainWindow destructor: - Deleting main_ui_ triggers a currentChanged signal which in turn calls mainStackChanged that references the freed main_ui_ object. Prevent use after free error by disconnecting from the signal before freeing. - Explicitly free file_set_dialog_ as no rparent perform the cleanup. Bug: 14071 Change-Id: I9c1fbef04cf68bfffffea57ef298f4896d6583f9 Reviewed-on: https://code.wireshark.org/review/23739 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'wireshark-qt.cpp')
-rw-r--r--wireshark-qt.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/wireshark-qt.cpp b/wireshark-qt.cpp
index 61fac58..538994d 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();