Skip to content
Snippets Groups Projects

editcap, libwiretap: Don't use array of initial DSBs after freeing

Merged John Thacker requested to merge cherry-pick-be3550b3 into release-4.2

wtap_dump_close frees the passed in GArray of initial DSBs, used by editcap for injecting DSBs from a file or list of files.

Add functions to increment and decrement the reference count of an array of wtap blocks. Dereference the block of initial DSBs in wtap_dump_close() instead of freeing it. In editcap, before closing the dump file in cases where we intend to open a new file (e.g., with a maximum time value or a maximum packet count), reference the block.

Fix #19782 (closed), #19783 (closed), #19784 (closed).

(cherry picked from commit be3550b3)

Co-authored-by: John Thacker johnthacker@gmail.com

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading