diff options
-rw-r--r-- | editcap.c | 16 |
1 files changed, 9 insertions, 7 deletions
@@ -1006,6 +1006,8 @@ main(int argc, char *argv[]) "\n" "%s", get_ws_vcs_version_info(), comp_info_str->str, runtime_info_str->str); + g_string_free(comp_info_str, TRUE); + g_string_free(runtime_info_str, TRUE); /* * Get credential information for later use. @@ -1237,6 +1239,8 @@ main(int argc, char *argv[]) break; case 'V': + comp_info_str = get_compiled_version_info(NULL, NULL); + runtime_info_str = get_runtime_version_info(NULL); show_version("Editcap (Wireshark)", comp_info_str, runtime_info_str); g_string_free(comp_info_str, TRUE); g_string_free(runtime_info_str, TRUE); @@ -1822,18 +1826,11 @@ main(int argc, char *argv[]) } } - g_free(idb_inf); - idb_inf = NULL; - if (!wtap_dump_close(pdh, &write_err)) { fprintf(stderr, "editcap: Error writing to %s: %s\n", filename, wtap_strerror(write_err)); goto error_on_exit; } - wtap_block_array_free(shb_hdrs); - shb_hdrs = NULL; - wtap_block_array_free(nrb_hdrs); - nrb_hdrs = NULL; g_free(filename); if (frames_user_comments) { @@ -1853,6 +1850,11 @@ main(int argc, char *argv[]) (long int)relative_time_window.nsecs); } + wtap_block_array_free(shb_hdrs); + wtap_block_array_free(nrb_hdrs); + g_free(idb_inf); + wtap_close(wth); + return 0; error_on_exit: |