Wireshark-commits: [Wireshark-commits] master dc7f935: kafka: zstd: free the composite tvb only onc

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Sun, 19 Jul 2020 19:07:02 +0000
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=dc7f9353302fa1dd522a76130fa82c8d9fa62fbd
Submitter: "Alexis La Goutte <alexis.lagoutte@xxxxxxxxx>"
Changed: branch: master
Repository: wireshark

Commits:

dc7f935 by Martin Kaiser (wireshark@xxxxxxxxx):

    kafka: zstd: free the composite tvb only once
    
    Fix the composite tvb handling for zstd decompression in the same way as
    we already did for lz4 and snappy.
    
    Allocate the composite tvb only if we are cetain that data will be added
    to it. Do not free the composite tvb ourselves, leave this to epan cleanup.
    
    Change-Id: Iac74ea6e6d220b05858a7eb267276ff983b1b2ab
    Reviewed-on: https://code.wireshark.org/review/37900
    Reviewed-by: Martin Kaiser <wireshark@xxxxxxxxx>
    Petri-Dish: Martin Kaiser <wireshark@xxxxxxxxx>
    Tested-by: Petri Dish Buildbot
    Reviewed-by: Alexis La Goutte <alexis.lagoutte@xxxxxxxxx>
    

Actions performed:

    from  391d451   smb2: SMB_EXT_FILE_ATTR is misused to parse FileAttributes of SMB2.
     add  dc7f935   kafka: zstd: free the composite tvb only once


Summary of changes:
 epan/dissectors/packet-kafka.c | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)