capture_opts: always initialize ifname to null.

Fixes #17318.
This commit is contained in:
Guy Harris 2021-03-26 13:04:36 -07:00
parent 525006f97b
commit 6da96eeb2a
1 changed files with 2 additions and 0 deletions

View File

@ -45,6 +45,7 @@ capture_opts_init(capture_options *capture_opts)
capture_opts->num_selected = 0;
capture_opts->default_options.name = NULL;
capture_opts->default_options.descr = NULL;
capture_opts->default_options.ifname = NULL;
capture_opts->default_options.hardware = NULL;
capture_opts->default_options.display_name = NULL;
capture_opts->default_options.cfilter = NULL;
@ -1254,6 +1255,7 @@ collect_ifaces(capture_options *capture_opts)
if (!device->hidden && device->selected) {
interface_opts.name = g_strdup(device->name);
interface_opts.descr = g_strdup(device->friendly_name);
interface_opts.ifname = NULL;
interface_opts.hardware = g_strdup(device->vendor_description);
interface_opts.display_name = g_strdup(device->display_name);
interface_opts.linktype = device->active_dlt;