void epan_dissect_cleanup(epan_dissect_t* edt) { g_assert(edt); g_slist_free(edt->pi.proto_data); g_slist_free(edt->pi.dependent_frames); /* Free the data sources list. */ free_data_sources(&edt->pi); if (edt->tvb) { /* Free all tvb's chained from this tvb */ tvb_free_chain(edt->tvb); } if (edt->tree) { proto_tree_free(edt->tree); } if (pinfo_pool_cache == NULL) { wmem_free_all(edt->pi.pool); pinfo_pool_cache = edt->pi.pool; } else { wmem_destroy_allocator(edt->pi.pool); } }
/* APB: from wireshark-1.4.0/epan/epan.c, backported for wireshark pre-1.4.0 support */ void epan_dissect_cleanup(epan_dissect_t* edt) { g_assert(edt); /* Free the data sources list. */ free_data_sources(&edt->pi); /* Free all tvb's created from this tvb, unless dissector * wanted to store the pointer (in which case, the dissector * would have incremented the usage count on that tvbuff_t*) */ tvb_free_chain(edt->tvb); if (edt->tree) { proto_tree_free(edt->tree); } }
void epan_dissect_cleanup(epan_dissect_t* edt) { g_assert(edt); g_slist_free(edt->pi.dependent_frames); /* Free the data sources list. */ free_data_sources(&edt->pi); /* Free all tvb's chained from this tvb */ tvb_free_chain(edt->tvb); if (edt->tree) { proto_tree_free(edt->tree); } }