aboutsummaryrefslogtreecommitdiffstats
path: root/capinfos.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 /capinfos.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 'capinfos.c')
-rw-r--r--capinfos.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/capinfos.c b/capinfos.c
index f049864673..428093c2c9 100644
--- a/capinfos.c
+++ b/capinfos.c
@@ -1231,11 +1231,6 @@ process_cap_file(wtap *wth, const char *filename)
fprintf(stderr,
" (will continue anyway, checksums might be incorrect)\n");
} else {
- if (err_info != NULL) {
- fprintf(stderr, "(%s)\n", err_info);
- g_free(err_info);
- }
-
cleanup_capture_info(&cf_info);
return 1;
}