Stat table element arrays are allocated once at startup. Reset each
element in free_stat_table() instead of freeing them.
Change-Id: Ia63af93c76a1348bbb809137a521eead58a52dd1
Reviewed-on: https://code.wireshark.org/review/9860
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
if (new_stat->stat_tap_free_table_item_cb)
new_stat->stat_tap_free_table_item_cb(stat_table, element, field_index, field_data);
}
-
- g_free(stat_table->elements[element]);
+ memset(stat_table->elements[i], 0, sizeof(field_data) * stat_table->num_fields);
}
-
- g_free(stat_table->elements);
}
}