Ethereal-dev: Re: [Ethereal-dev] Patch epan/proto.c - proto_tree_append_string( )

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

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Mon, 27 Oct 2003 15:50:23 -0800

On Oct 27, 2003, at 12:49 PM, Gilbert Ramirez wrote:

Note the fvalue_free() frees the memory used by the fvalue_t structure,
so the fvalue_set() immediately after fvalue_free() is writing to
deallocated memory.

...and fvalue_set() without fvalue_free() leaks memory, as the old string isn't freed.

Should string_fvalue_set() free fv->value.string if it's non-null?