Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Ethereal-dev: Re: [Ethereal-dev] EMEM tvb_get_xxx and further directions

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

Date: Sun, 24 Jul 2005 02:27:12 +0200
If it goes to votes,  I vote for it!

BTW:  there's also tvb_memdup that should be handled the same way.

Luis

On 7/24/05, ronnie sahlberg <ronniesahlberg@xxxxxxxxx> wrote:
> List
> 
> There are only some 157 uses of tvb_get_string() and tvb_get_stringz()
> used by dissectors.
> They currently return g_malloced memory and a quick glance at their
> use is that most of them virtually immediately g_free() that same
> memory after doing a proto_tree_add_xxx or similar processing of them.
> 
> I also saw some uses that obviously leak memory since g_free was never
> called, such as in packet-atalk.c .
> 
> 
> For this i think we should change the semantics for tvb_get_string[z]
> slightly and make it into
> tvb_get_string[z]_ep    for allocations with packet lifetime and
> tvb_get_string[z]_ec    for allocations with capture file lifetime.
> 
> 
> Opinions?   maybe better names should be used?
> 
> _______________________________________________
> Ethereal-dev mailing list
> Ethereal-dev@xxxxxxxxxxxx
> http://www.ethereal.com/mailman/listinfo/ethereal-dev
> 


-- 
This information is top security. When you have read it, destroy yourself.
-- Marshall McLuhan