From 28b76dbb9e3b7f1c4469fcb20d60371888fa7c00 Mon Sep 17 00:00:00 2001 From: Michael Mann Date: Thu, 3 Mar 2016 09:24:19 -0500 Subject: 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 --- wiretap/wtap_opttypes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'wiretap') 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); } } -- cgit v1.2.3