aboutsummaryrefslogtreecommitdiffstats
path: root/capture_opts.c
diff options
context:
space:
mode:
authorMikael Kanstrup <mikael.kanstrup@gmail.com>2017-08-28 15:26:42 +0200
committerPeter Wu <peter@lekensteyn.nl>2017-08-28 16:53:38 +0000
commit287221e8d9591bf252392ec34959e24c49fcd275 (patch)
tree6759bc3905d5a907d2edcaccb8cd68c1e85cc5a2 /capture_opts.c
parent879920a2ebaacf33e554ab47e340c34fe2e878d8 (diff)
Free interface_options elements on cleanup
At shutdown the array keeping all interface_options is freed. The array elements however are not making valgrind and ASAN complain. Make sure the elements are freed on cleanup. Ping-Bug: 13864 Change-Id: If8b810ea5f4f11c5ce770a9ffa6c2c791bc561fe Reviewed-on: https://code.wireshark.org/review/23265 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Diffstat (limited to 'capture_opts.c')
-rw-r--r--capture_opts.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/capture_opts.c b/capture_opts.c
index 899268a9fb..2b527afa53 100644
--- a/capture_opts.c
+++ b/capture_opts.c
@@ -138,6 +138,9 @@ capture_opts_cleanup(capture_options *capture_opts)
return;
if (capture_opts->ifaces) {
+ while (capture_opts->ifaces->len > 0) {
+ capture_opts_del_iface(capture_opts, 0);
+ }
g_array_free(capture_opts->ifaces, TRUE);
capture_opts->ifaces = NULL;
}