Wireshark-bugs: [Wireshark-bugs] [Bug 7530] Memory leak of proto data GSList and frame comment w
Date: Wed, 13 Mar 2013 10:08:41 +0000

Comment # 2 on bug 7530 from
(In reply to comment #1)
> As of r48030, free_frame_data_sequence() correctly calls
> frame_data_cleanup() for every frame it owns.
> 
> free_frame_data_sequence() is already called by cf_reset_state(), which is
> called by cf_close().
> 
> We do not, however, free fdata->opt_comment in frame_data_cleanup because,
> as indicated by the comment in that function: "frame_data_cleanup() is
> called when redissecting (rescan_packets()), which might be triggered by lot
> of things, like: preferences change, setting manual address resolve, etc..
> (grep by redissect_packets). fdata->opt_comment can be set by user, which we
> must not discard when redissecting."
> 
> Not sure the best way to scope that.

I think Jakub suggested to store the comments in a hashtable and just use a
flag in frame data whether there is a comment or not (to save memory). We
should perhaps differentiate between saved comments which can be read back from
file and comments added during the session which would have to be preserved in
memory. Re reading a file a check in the "new unsaved comments" hastable could
be done per frame - capacity loss? use a flag for empty table?

Or a more brutal approach "Unsaved comments exists - please (re)save your file"
Regards
Anders


You are receiving this mail because:
  • You are watching all bug changes.