aboutsummaryrefslogtreecommitdiffstats
path: root/wireshark-qt.cpp
diff options
context:
space:
mode:
authorPascal Quantin <pascal.quantin@gmail.com>2016-05-11 15:16:44 +0200
committerPascal Quantin <pascal.quantin@gmail.com>2016-05-13 12:53:56 +0000
commitf3e120816c1e74eda131f95a74e61777995c2c7b (patch)
tree8d7dddd701cee2ad8d38c5f2163b07819b7248ca /wireshark-qt.cpp
parentde61fb1cfbba8683c93672f38824202da13dad26 (diff)
Qt: add some cleanup function calls missing when leaving application
Change-Id: I8f22d321e84daa36d4a40856b61d0844d3489cc2 Reviewed-on: https://code.wireshark.org/review/15374 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Diffstat (limited to 'wireshark-qt.cpp')
-rw-r--r--wireshark-qt.cpp20
1 files changed, 18 insertions, 2 deletions
diff --git a/wireshark-qt.cpp b/wireshark-qt.cpp
index b460483419..c549f0f169 100644
--- a/wireshark-qt.cpp
+++ b/wireshark-qt.cpp
@@ -422,7 +422,7 @@ int main(int argc, char *argv[])
{
MainWindow *main_w;
- int opt;
+ int opt, ret_val;
gboolean arg_error = FALSE;
char **ws_argv = argv;
@@ -1414,7 +1414,23 @@ int main(int argc, char *argv[])
profile_store_persconffiles(FALSE);
- return wsApp->exec();
+ ret_val = wsApp->exec();
+
+ epan_cleanup();
+
+ AirPDcapDestroyContext(&airpdcap_ctx);
+
+#ifdef _WIN32
+ /* Shutdown windows sockets */
+ WSACleanup();
+
+ /* For some unknown reason, the "atexit()" call in "create_console()"
+ doesn't arrange that "destroy_console()" be called when we exit,
+ so we call it here if a console was created. */
+ destroy_console();
+#endif /* _WIN32 */
+
+ return ret_val;
}
/*