Ethereal-dev: [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: Sirop Erable <matrix_ottawa@xxxxxxxx>
Date: Fri, 2 Nov 2001 16:23:32 -0500 (EST)
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 in "void proto_cleanup(void)". You should replace: "if(gpa_hfinfo) g_ptr_array_free(gpa_hfinfo, FALSE);" by "if(gpa_hfinfo) g_ptr_array_free(gpa_hfinfo, TRUE);" Finally, is it possible in ethereal-0.8.20 to rename the variable "private" in the structure packet_info, because when I link my project wrote in C++ with ethereal-0.8.20 I have an error (even if I use extern "C"). Thank you. Matrix