From 1df39d65f567803929f4b009409f872cd7c46622 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stig=20Bj=C3=B8rlykke?= Date: Tue, 19 Feb 2019 19:50:44 +0100 Subject: Qt: Fix removal of "Capture to a permanent file" setting MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman --- capture_opts.c | 1 + 1 file changed, 1 insertion(+) (limited to 'capture_opts.c') 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 */ -- cgit v1.2.3