reordercap: fix memleak on exit

Change-Id: I328fe03ab6c72b2bb9c4ead01170a341e5bd4d1a
Reviewed-on: https://code.wireshark.org/review/17624
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
This commit is contained in:
Peter Wu 2016-09-10 13:03:38 +02:00
parent e5fef1d73e
commit 7541a004d0
1 changed files with 6 additions and 2 deletions

View File

@ -212,6 +212,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.
@ -257,6 +259,8 @@ main(int argc, char *argv[])
print_usage(stdout);
exit(0);
case 'v':
comp_info_str = get_compiled_version_info(NULL, NULL);
runtime_info_str = get_runtime_version_info(NULL);
show_version("Reordercap (Wireshark)", comp_info_str, runtime_info_str);
g_string_free(comp_info_str, TRUE);
g_string_free(runtime_info_str, TRUE);
@ -393,8 +397,8 @@ main(int argc, char *argv[])
wtap_block_array_free(shb_hdrs);
wtap_block_array_free(nrb_hdrs);
/* Finally, close infile */
wtap_fdclose(wth);
/* Finally, close infile and release resources. */
wtap_close(wth);
return 0;
}