Wireshark-commits: [Wireshark-commits] master 9d5ab21: wiretap: fix leak of options_buf and documen
From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Thu, 24 Jan 2019 04:21:29 +0000
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=9d5ab211635e201692cc250732be50a234e03d1c
Submitter: "Anders Broman <a.broman58@xxxxxxxxx>"
Changed: branch: master
Repository: wireshark

Commits:

9d5ab21 by Peter Wu (peter@xxxxxxxxxxxxx):

    wiretap: fix leak of options_buf and document memory handling
    
    Manually checked all callers of wtap_seek_read to ensure that
    wtap_rec_cleanup is called. Added missing wtap_rec_cleanup to:
    - Completion of sequential read: wtap_sequential_close
    - Callers of wtap_seek_read:
      - users of cf_read_record_r:
        - PacketListRecord::dissect
    
    This fixes one of the two ASAN memleak reports while running
    test_tshark_z_expert_comment and test_text2pcap_sip_pcapng (the other is
    about opt_comment which is still unfixed).
    
    Vasil Velichkov also found this issue and came up with a similar fix.
    
    Change-Id: I54a6aa70bfdb42a816d03ad4861d0ad821d0ef88
    Reviewed-on: https://code.wireshark.org/review/31709
    Petri-Dish: Peter Wu <peter@xxxxxxxxxxxxx>
    Tested-by: Petri Dish Buildbot
    Reviewed-by: Anders Broman <a.broman58@xxxxxxxxx>
    

Actions performed:

    from  9175a23   travis: enable capture tests on Linux and macOS
     add  9d5ab21   wiretap: fix leak of options_buf and document memory handling


Summary of changes:
 ui/qt/models/packet_list_record.cpp | 4 +++-
 wiretap/file_access.c               | 4 +++-
 wiretap/pcapng.c                    | 6 +++++-
 wiretap/wtap.c                      | 2 ++
 4 files changed, 13 insertions(+), 3 deletions(-)