diff options
author | Hadriel Kaplan <hadrielk@yahoo.com> | 2015-07-20 11:09:06 -0400 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2015-08-18 05:52:45 +0000 |
commit | e25562baddd7a675510daea9bb6a6e4ab36b2d68 (patch) | |
tree | 2338173d5f211716b8004c915ee92713d197c1b1 /reordercap.c | |
parent | 4048ca0a27b7ed693b91103ed6912a4a1abfa3db (diff) |
Pcapng: clean up Section Header Block handling
Change-Id: I8516d0c561ed0b63e49a3594027c9c15bb789258
Reviewed-on: https://code.wireshark.org/review/9726
Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
Petri-Dish: Hadriel Kaplan <hadrielk@yahoo.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'reordercap.c')
-rw-r--r-- | reordercap.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/reordercap.c b/reordercap.c index a5d936cead..53e7f45c20 100644 --- a/reordercap.c +++ b/reordercap.c @@ -274,7 +274,7 @@ DIAG_ON(cast-qual) } DEBUG_PRINT("file_type_subtype is %u\n", wtap_file_type_subtype(wth)); - shb_hdr = wtap_file_get_shb_info(wth); + shb_hdr = wtap_file_get_shb_for_new_file(wth); idb_inf = wtap_file_get_idb_info(wth); nrb_hdr = wtap_file_get_nrb_for_new_file(wth); @@ -287,7 +287,7 @@ DIAG_ON(cast-qual) if (pdh == NULL) { fprintf(stderr, "reordercap: Failed to open output file: (%s) - error %s\n", outfile, wtap_strerror(err)); - g_free(shb_hdr); + wtap_free_shb(shb_hdr); wtap_free_nrb(nrb_hdr); exit(1); } @@ -361,11 +361,11 @@ DIAG_ON(cast-qual) if (!wtap_dump_close(pdh, &err)) { fprintf(stderr, "reordercap: Error closing %s: %s\n", outfile, wtap_strerror(err)); - g_free(shb_hdr); + wtap_free_shb(shb_hdr); wtap_free_nrb(nrb_hdr); exit(1); } - g_free(shb_hdr); + wtap_free_shb(shb_hdr); wtap_free_nrb(nrb_hdr); /* Finally, close infile */ |