forked from osmocom/wireshark
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>
This commit is contained in:
parent
752c48f864
commit
8646596829
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue