Commit Graph

10 Commits

Author SHA1 Message Date
Evan Huus efaa8d71a5 Rewrite free_frame_data_sequence to use recursion instead of manually nested
loops.

This allows us to do the calculations to actually free all the frame data
instances correctly - the previous version was missing many of them,
leading to large memory leaks when given lots of frames that made use of
p_add_proto_data.

Fixes the rest of https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7885

svn path=/trunk/; revision=48030
2013-03-03 03:26:09 +00:00
Anders Broman 2eb5d3eb04 From beroset:
remove C++ incompatibilities from frame_data_sequence.c

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416

svn path=/trunk/; revision=47999
2013-03-02 09:06:03 +00:00
Evan Huus 7d1a8f8355 Fix potential copy-and-pasto in free_frame_data_sequence that may or may not
be the cause of https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8022

svn path=/trunk/; revision=46315
2012-12-01 18:19:08 +00:00
Evan Huus acb53e7d4c Call frame_data_cleanup() before freeing frame_data structures in
free_frame_data_sequence(). Prevents part of the leak identified in
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7885

svn path=/trunk/; revision=46000
2012-11-11 16:43:33 +00:00
Jakub Zawadzki 125d26fe93 Fix small memleak: always free fds in free_frame_data_sequence()
svn path=/trunk/; revision=45949
2012-11-06 15:07:21 +00:00
Jeff Morriss 3551a86c36 We always HAVE_CONFIG_H so don't bother checking whether we have it or not.
svn path=/trunk/; revision=45015
2012-09-20 01:29:52 +00:00
Jakub Zawadzki 90e68a72b9 Use g_malloc0
svn path=/trunk/; revision=44984
2012-09-18 20:07:06 +00:00
Jakub Zawadzki bf81b42e1e Update Free Software Foundation address.
(COPYING will be updated in next commit)

svn path=/trunk/; revision=43536
2012-06-28 22:56:06 +00:00
Guy Harris f43797cf42 Make the frame_data_sequence structure opaque, and move some other
implementation details into frame_data_sequence.c as well.

svn path=/trunk/; revision=36886
2011-04-27 04:11:37 +00:00
Guy Harris c9b9dd690b Create a new frame_data_sequence data type; it represents a dense
sequence of frame_data structures, indexed by the frame number.  Extract
the relevant bits of the capture_file data structure and move them to
the frame_data_sequence, and move the relevant code from cfile.c and
tweak it to handle frame_data_sequence structures.

Have a possibly-null pointer to a frame_data_sequence structure in the
capture_file structure; if it's null, we aren't keeping a sequence of
frame_data structures (we don't keep that sequence when we're doing
one-pass processing in TShark).

Nothing in libwireshark should care about a capture_file structure; get
rid of some unnecessary includes of cfile.h.

svn path=/trunk/; revision=36881
2011-04-27 02:54:44 +00:00