diff options
author | Stig Bjørlykke <stig@bjorlykke.org> | 2019-02-19 19:50:44 +0100 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2019-02-20 04:22:51 +0000 |
commit | 1df39d65f567803929f4b009409f872cd7c46622 (patch) | |
tree | 96d5c02284d7071df23771077cad112128795965 /capture_opts.c | |
parent | efe920af3a9f4d7a35c427ceaf4f95e31050f4d3 (diff) |
Qt: Fix removal of "Capture to a permanent file" setting
Make it possible to remove the "Capture to a permanent file" setting
in Capture Interfaces Output dialog by turning off saving_to_file in
updateInterfaces().
Also make sure to free the old values for save_file and orig_save_file
to avoid memory leaks.
Set orig_save_file to the same as save_file from the '-w' option to
fill in the current "Capture to a permanent file" value correctly.
Change-Id: I1f4df8cfa279f934eff028f32838b9734b627af1
Reviewed-on: https://code.wireshark.org/review/32111
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'capture_opts.c')
-rw-r--r-- | capture_opts.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/capture_opts.c b/capture_opts.c index 16d44d1970..8c7e97a516 100644 --- a/capture_opts.c +++ b/capture_opts.c @@ -935,6 +935,7 @@ capture_opts_add_opt(capture_options *capture_opts, int opt, const char *optarg_ capture_opts->saving_to_file = TRUE; g_free(capture_opts->save_file); capture_opts->save_file = g_strdup(optarg_str_p); + capture_opts->orig_save_file = g_strdup(optarg_str_p); status = capture_opts_output_to_pipe(capture_opts->save_file, &capture_opts->output_to_pipe); return status; case 'y': /* Set the pcap data link type */ |