Ethereal-dev: [Ethereal-dev] Do I have to free tvbuff's?

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Mark Atwood <mra@xxxxxxxxx>
Date: 08 Nov 2000 14:35:22 -0800
I'm porting my dissector over to tvbuffs. Do I have to free a tvbuff
before it goes out of scope?

I first dissect the header, adn then do something like the following
to dissect the payload..

	/* dissect a single payload */
	{
	  tvbuff_t *payload_tvb;

	  payload_tvb
	    = tvb_new_subset(tvb, header_size), -1,
			     sizeof_payloadpart(peeled_iquery_header.type));

	  dissect_my_payload(payload_type,
				 payload_tvb,
				 tree_my_payload);
	}