Wireshark-dev: Re: [Wireshark-dev] [Wireshark-commits] rev 44485: /trunk/epan/ /trunk/epan/: li
From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Tue, 14 Aug 2012 09:27:19 -0700
On Aug 14, 2012, at 4:24 AM, grahamb@xxxxxxxxxxxxx wrote:

> http://anonsvn.wireshark.org/viewvc/viewvc.cgi?view=rev&revision=44485
> 
> User: grahamb
> Date: 2012/08/14 04:24 AM
> 
> Log:
> Added proto_tree_free to the libwireshark expoert definitions for use in plugins

What plugin would have a need for it?  Freeing the protocol tree filled up by a dissection done elsewhere would be considered a bit impolite, as it might pull the tree out from under somebody using it.  If the plugin has done its own top-level dissection (which seems a bit odd - dissectors shouldn't be doing that, taps shouldn't need to do that as the tapping should be doing the dissection for it, file format plugins are at a level below libwireshark and shouldn't even know what a protocol tree *is*, and codecs are orthogonal to dissection), it should have done it with the epan_ APIs and thus should free it with a call to epan_dissect_cleanup() or epan_dissect_free().