diff options
author | Guy Harris <guy@alum.mit.edu> | 2014-10-23 03:27:15 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2014-10-23 10:27:57 +0000 |
commit | 97a920cb21c0617f78a03c33510594e9904fd052 (patch) | |
tree | 996ea75cb6195636c93a120c1eef95c0c50eef46 | |
parent | a0d5ef8ff74b278a3665637f94691bd4c56e27a6 (diff) |
Don't free global_capture_opts.ifaces_err_info.
Leave it around in case InterfaceTree::display() gets invoked without an
intervening call to scan_local_interfaces() (that would cause a
double-free) or in case scan_local_interfaces() gets called afterwards
(as it frees global_capture_opts.ifaces_err_info before setting it
again, so there's no leak there, but there would be a double-free).
This should prevent at least one crash I've seen.
Change-Id: Iedd3959b420c09971557c473cc87aefd4454078c
Reviewed-on: https://code.wireshark.org/review/4917
Reviewed-by: Guy Harris <guy@alum.mit.edu>
-rw-r--r-- | ui/qt/interface_tree.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ui/qt/interface_tree.cpp b/ui/qt/interface_tree.cpp index 6512a960a1..012b5653b1 100644 --- a/ui/qt/interface_tree.cpp +++ b/ui/qt/interface_tree.cpp @@ -137,7 +137,7 @@ void InterfaceTree::display() if (global_capture_opts.ifaces_err == 0) { err_label = new QLabel("No interfaces found"); } else { - err_label = new QLabel(gchar_free_to_qstring(global_capture_opts.ifaces_err_info)); + err_label = new QLabel(global_capture_opts.ifaces_err_info); } err_label->setWordWrap(true); |