Skip to content

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

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).

Merge request reports