Wireshark-commits: [Wireshark-commits] master 6b58915: Qt: Fix memory leak in TCP Stream Dialog
From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Tue, 14 Apr 2020 15:36:05 +0000
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=6b589151a29ff7a3cb3ce05d1c86bfd34bb1ae5d
Submitter: "Tomasz Moń <desowin@xxxxxxxxx>"
Changed: branch: master
Repository: wireshark

Commits:

6b58915 by Stig Bjørlykke (stig@xxxxxxxxxxxxx):

    Qt: Fix memory leak in TCP Stream Dialog
    
    Do not copy addresses at when dialog opens, they will be initialized
    in tapall_tcpip_packet(). Do not clear addresses when switching stream,
    they will be properly removed in graph_segment_list_free().
    
    Correctly free addresses in graph_segment_list_free() which is called
    when switching stream and when closing the dialog. Free copied addresses
    when switching direction (address swap).
    
    Remove redundant and unused code.
    
    Change-Id: I4328aa4df333f59c587f841b74a24dc71d329079
    Reviewed-on: https://code.wireshark.org/review/36840
    Petri-Dish: Stig Bjørlykke <stig@xxxxxxxxxxxxx>
    Tested-by: Petri Dish Buildbot
    Reviewed-by: Tomasz Moń <desowin@xxxxxxxxx>
    

Actions performed:

    from  d3c4dfa   wsutil: use ws_in4_addr in tvb_get_ipv4_addr_with_prefix_len.
     add  6b58915   Qt: Fix memory leak in TCP Stream Dialog


Summary of changes:
 ui/qt/tcp_stream_dialog.cpp | 28 ++++++-----------
 ui/tap-tcp-stream.c         | 76 ++++++++++++++++-----------------------------
 ui/tap-tcp-stream.h         |  7 ++---
 3 files changed, 37 insertions(+), 74 deletions(-)