aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/file_access.c
diff options
context:
space:
mode:
authorHadriel Kaplan <hadrielk@yahoo.com>2015-08-20 14:38:35 -0400
committerAnders Broman <a.broman58@gmail.com>2015-08-21 04:55:20 +0000
commitfab0e59c70bfd8e39189ac29b17333d85d4645cb (patch)
tree70ebe57fc81481ca1ead1df4067bf547262b4935 /wiretap/file_access.c
parentb4762a043458e5205090282a099184980fb555ea (diff)
Fix memory leaks of dumper SHB and IDB infos
Change-Id: I6b81d3e853d503c6a81f9793957b48ab34c6808c Reviewed-on: https://code.wireshark.org/review/10156 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 'wiretap/file_access.c')
-rw-r--r--wiretap/file_access.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/wiretap/file_access.c b/wiretap/file_access.c
index 69604e2371..0ae80a99c9 100644
--- a/wiretap/file_access.c
+++ b/wiretap/file_access.c
@@ -2169,10 +2169,12 @@ wtap_dump_init_dumper(int file_type_subtype, int encap, int snaplen, gboolean co
if ((idb_inf != NULL) && (idb_inf->interface_data->len > 0)) {
guint itf_count;
+ /* XXX: what free's this stuff? */
wdh->interface_data = g_array_new(FALSE, FALSE, sizeof(wtapng_if_descr_t));
for (itf_count = 0; itf_count < idb_inf->interface_data->len; itf_count++) {
file_int_data = &g_array_index(idb_inf->interface_data, wtapng_if_descr_t, itf_count);
if ((encap != WTAP_ENCAP_PER_PACKET) && (encap != file_int_data->wtap_encap)) {
+ /* XXX: this does a shallow copy, not a true clone; e.g., comments are not duped */
memcpy(&descr, file_int_data, sizeof(wtapng_if_descr_t));
descr.wtap_encap = encap;
descr.link_type = wtap_wtap_encap_to_pcap_encap(encap);