aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2016-03-03 09:24:19 -0500
committerMichael Mann <mmann78@netscape.net>2016-03-03 14:25:36 +0000
commit28b76dbb9e3b7f1c4469fcb20d60371888fa7c00 (patch)
tree2c330a4e9322e50af1f6b49da758cdf4b1667b4d /wiretap
parent45406f5cffcda7c2fbc44670d0643275f30b1e1a (diff)
Allocate GArray when copying stat blocks within IDB block.
Don't treat it like a GList Bug: 12220 Change-Id: I057649a26d135516c6e8d4fb028c6cb9dcda2e7c Reviewed-on: https://code.wireshark.org/review/14326 Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'wiretap')
-rw-r--r--wiretap/wtap_opttypes.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/wiretap/wtap_opttypes.c b/wiretap/wtap_opttypes.c
index e287ea1b92..376ac1316e 100644
--- a/wiretap/wtap_opttypes.c
+++ b/wiretap/wtap_opttypes.c
@@ -447,7 +447,7 @@ void wtap_optionblock_copy_options(wtap_optionblock_t dest_block, wtap_optionblo
memcpy(dest_mand, src_mand, sizeof(wtapng_if_descr_mandatory_t));
if (src_mand->num_stat_entries != 0)
{
- dest_mand->interface_statistics = NULL;
+ dest_mand->interface_statistics = g_array_new(FALSE, FALSE, sizeof(wtap_optionblock_t));
dest_mand->interface_statistics = g_array_append_vals(dest_mand->interface_statistics, src_mand->interface_statistics->data, src_mand->interface_statistics->len);
}
}