aboutsummaryrefslogtreecommitdiffstats
path: root/tshark.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2017-04-29 04:28:53 -0700
committerGuy Harris <guy@alum.mit.edu>2017-04-29 11:29:34 +0000
commit2a3f1a4f6724c061f47a0266e157e6d84aa65c7d (patch)
treebdb778c127d6cb73751c7bfc2766a6ba1cecac0d /tshark.c
parente3f49280deb11a7055083634fbbc4d8416fce024 (diff)
Eliminate some double-frees.
The cfile_ error-reporting routines free err_info; the caller doesn't have to and, in fact, mustn't do so themselves. While we're at it, make sure wtap_seek_read() always zeroes out *err and nulls out *err_info, so the latter either points to a freshly-allocated string or is null. Change-Id: Idfe05a3ba2fbf2647ba14e483187617ee53e3c69 Reviewed-on: https://code.wireshark.org/review/21407 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'tshark.c')
-rw-r--r--tshark.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/tshark.c b/tshark.c
index 7fc5938385..071e5d8776 100644
--- a/tshark.c
+++ b/tshark.c
@@ -3317,13 +3317,11 @@ process_cap_file(capture_file *cf, char *save_file, int out_file_type,
/* Error on pass 1 of two-pass processing. */
cfile_read_failure_message("TShark", cf->filename, err_pass1,
err_info_pass1);
- g_free(err_info_pass1);
}
if (err != 0) {
/* Error on pass 2 of two-pass processing or on the only pass of
one-pass processing. */
cfile_read_failure_message("TShark", cf->filename, err, err_info);
- g_free(err_info);
}
success = FALSE;
}