Wireshark-commits: [Wireshark-commits] master-3.2 ced45c9: kafka: zstd: free the composite tvb only

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Tue, 11 Aug 2020 23:53:25 +0000
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=ced45c939878f91b47527a0ca5c281fa4e46741a
Submitter: "Gerald Combs <gerald@xxxxxxxxxxxxx>"
Changed: branch: master-3.2
Repository: wireshark

Commits:

ced45c9 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>
    (cherry picked from commit dc7f9353302fa1dd522a76130fa82c8d9fa62fbd)
    Reviewed-on: https://code.wireshark.org/review/38129
    Petri-Dish: Gerald Combs <gerald@xxxxxxxxxxxxx>
    Reviewed-by: Gerald Combs <gerald@xxxxxxxxxxxxx>
    

Actions performed:

    from  fa44fec   kafka: snappy: free the composite tvb only once
     add  ced45c9   kafka: zstd: free the composite tvb only once


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