Wireshark-commits: [Wireshark-commits] master-3.2 fa44fec: kafka: snappy: free the composite tvb on

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

Commits:

fa44fec by Martin Kaiser (wireshark@xxxxxxxxx):

    kafka: snappy: free the composite tvb only once
    
    The snappy decompression routine has the same bug that was fixed for lz4 in
    79576219c9 ("kafka: lz4: free the composite tvb only once").
    
    Refactor the composite tvb handling for snappy as well. 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: Ide3a88d1c02e525fe1aadd176068ce68c2330b98
    Reviewed-on: https://code.wireshark.org/review/37838
    Reviewed-by: Martin Kaiser <wireshark@xxxxxxxxx>
    Petri-Dish: Martin Kaiser <wireshark@xxxxxxxxx>
    Tested-by: Petri Dish Buildbot
    Reviewed-by: Anders Broman <a.broman58@xxxxxxxxx>
    (cherry picked from commit 32a804dea2b6d657b581f5e5e14585099c53ddbe)
    Reviewed-on: https://code.wireshark.org/review/38128
    Petri-Dish: Gerald Combs <gerald@xxxxxxxxxxxxx>
    Reviewed-by: Gerald Combs <gerald@xxxxxxxxxxxxx>
    

Actions performed:

    from  5fdc375   [Automatic update for 2020-08-09]
     add  fa44fec   kafka: snappy: free the composite tvb only once


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