aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMikael Kanstrup <mikael.kanstrup@gmail.com>2017-08-25 13:58:20 +0200
committerPeter Wu <peter@lekensteyn.nl>2017-08-28 16:53:26 +0000
commit8646596829494dbe054a18958eac68682ba42721 (patch)
tree216587ccc92e895d2ba04a002a179fccc7e20791
parent752c48f8643935cd859a794e53e4a9f4fba73b03 (diff)
Fix leaks when active capture interface goes down
If an interface goes down while packet capture is ongoing related interface_option element is not freed properly. Fix by using the appropriate free function that both remove the element and frees element members. Ping-Bug: 13864 Change-Id: I66a11d64615dc9648441b532e4ff658ea42a5acf Reviewed-on: https://code.wireshark.org/review/23205 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
-rw-r--r--ui/qt/wireshark_application.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/ui/qt/wireshark_application.cpp b/ui/qt/wireshark_application.cpp
index a9340438ea..2e7d3b58e9 100644
--- a/ui/qt/wireshark_application.cpp
+++ b/ui/qt/wireshark_application.cpp
@@ -1042,7 +1042,7 @@ iface_mon_event_cb(const char *iface, int up)
for (j = 0; j < global_capture_opts.ifaces->len; j++) {
interface_opts = &g_array_index(global_capture_opts.ifaces, interface_options, j);
if (strcmp(interface_opts->name, device->name) == 0) {
- g_array_remove_index(global_capture_opts.ifaces, j);
+ capture_opts_del_iface(&global_capture_opts, j);
}
}
}