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; } diff --git a/file.c b/file.c index 72771c46be..f5e39f6581 100644 --- a/file.c +++ b/file.c @@ -1411,8 +1411,6 @@ cf_merge_files_to_tempfile(gpointer pd_window, char **out_filenamep, break; } - g_free(err_info); - cf_callback_invoke(cf_cb_file_merge_finished, NULL); if (status != MERGE_OK) { diff --git a/mergecap.c b/mergecap.c index cac00af45e..e696c0042f 100644 --- a/mergecap.c +++ b/mergecap.c @@ -494,8 +494,6 @@ main(int argc, char *argv[]) break; } - g_free(err_info); - clean_exit: wtap_cleanup(); free_progdirs(); 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; } diff --git a/wiretap/wtap.c b/wiretap/wtap.c index 1b9ab0552a..58a22e9298 100644 --- a/wiretap/wtap.c +++ b/wiretap/wtap.c @@ -1403,6 +1403,8 @@ wtap_seek_read(wtap *wth, gint64 seek_off, phdr->pkt_encap = wth->file_encap; phdr->pkt_tsprec = wth->file_tsprec; + *err = 0; + *err_info = NULL; if (!wth->subtype_seek_read(wth, seek_off, phdr, buf, err, err_info)) return FALSE;