Ethereal-dev: Re: [Ethereal-dev] Memory leak and packet_info structure.

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

From: Gilbert Ramirez <gram@xxxxxxxxxxxxxxx>
Date: Fri, 2 Nov 2001 15:35:52 -0600
On Fri, 02 Nov 2001 15:23:32 Sirop Erable wrote:
> Hi, from ethreal-0.8.19 in tvbuff.c there is a memory leek in the
> function "void tvb_free(tvbuff_t* tvb)". There should be at the end of
> the function (just before "g_chunk_free(tvb,
> tvbuff_mem_chunk);"):"if(tvb->ds_name & tvb->type != TVBUFF_SUBSET) 
> g_free(tvb->ds_name);".P.S. Is it possible to move the definition of
> tvbuff structure in tvbuff.h.In proto.c there is also a minor memory leak

Yes, it's _possible_ to move the definition of the tvbuff structure
into tvbuff.h, but why? The way it is, we're ensured that a tvbuff
is opaque and no routines dig around in the struct on their own.

--gilbert