summaryrefslogtreecommitdiff
path: root/ui/qt/interface_tree.cpp
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2014-10-23 03:27:15 -0700
committerGuy Harris <guy@alum.mit.edu>2014-10-23 10:27:57 +0000
commit97a920cb21c0617f78a03c33510594e9904fd052 (patch)
tree996ea75cb6195636c93a120c1eef95c0c50eef46 /ui/qt/interface_tree.cpp
parenta0d5ef8ff74b278a3665637f94691bd4c56e27a6 (diff)
downloadwireshark-97a920cb21c0617f78a03c33510594e9904fd052.tar.gz
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>
Diffstat (limited to 'ui/qt/interface_tree.cpp')
-rw-r--r--ui/qt/interface_tree.cpp2
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);