diff options
author | Peter Wu <peter@lekensteyn.nl> | 2016-09-10 13:03:38 +0200 |
---|---|---|
committer | Peter Wu <peter@lekensteyn.nl> | 2016-09-10 13:00:30 +0000 |
commit | 7541a004d0ff0242cfb9405859428d2b2ce2cafd (patch) | |
tree | d7b12006d24f467b5a5ef9c1892f0ffd17383fcb /reordercap.c | |
parent | e5fef1d73e687807ae1df40979ffc5a65dda03cc (diff) | |
download | wireshark-7541a004d0ff0242cfb9405859428d2b2ce2cafd.tar.gz |
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>
Diffstat (limited to 'reordercap.c')
-rw-r--r-- | reordercap.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/reordercap.c b/reordercap.c index e01f43c5fd..812825c6d0 100644 --- a/reordercap.c +++ b/reordercap.c @@ -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; } |