Wireshark-commits: [Wireshark-commits] master 7bca912: Don't allocate the interfaces array until we
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=7bca9126edb97ac598007da4a6d5c187a7ea830e
Submitter: Guy Harris (guy@xxxxxxxxxxxx)
Changed: branch: master
Repository: wireshark
Commits:
7bca912 by Guy Harris (guy@xxxxxxxxxxxx):
Don't allocate the interfaces array until we've read the SHB.
Nothing from the SHB gets stored in the interfaces array - it's filled
in from IDBs - so it doesn't need to exist when we read the first SHB,
and thus doesn't need to be freed if the attempt to read the SHB gets an
error or a "this isn't a pcap-ng file" indication.
Update a comment while we're at it.
Change-Id: Ie67edb52dcf13c974607e95e290661bf48be68ae
Reviewed-on: https://code.wireshark.org/review/4711
Reviewed-by: Guy Harris <guy@xxxxxxxxxxxx>
Actions performed:
from f518089 Clean up the read routines.
adds 7bca912 Don't allocate the interfaces array until we've read the SHB.
Summary of changes:
wiretap/pcapng.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)