URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=76afda963de4f0b9be24f2d8e873990a5cbf221b
Submitter: "Guy Harris <gharris@xxxxxxxxx>"
Changed: branch: master-3.2
Repository: wireshark
Commits:
76afda9 by Martin Kaiser (wireshark@xxxxxxxxx):
kafka: lz4: free the composite tvb only once
Try to clean up the composite tvb handling during lz4 decompression.
If we detect an error straight away before doing any lz4 decompression, we
don't allocate a composite tvb at all. The comments in the tvb code say
explicitly that we must not call tvb_new_composite() without adding at
least one piece of data.
If we start decompressing and run into problems after creating the
composite tvb and linking it to the packet's main tvb, we must not free
the composite tvb manually. The epan library will do this for us when
dissection of the packet is finished.
While at it, make sure that we always finalize the composite tvb if we
allocated it and added data to it.
Bug: 16672
Change-Id: I3e3fb303a823640d7707277a109019fc3aad22f2
Reviewed-on: https://code.wireshark.org/review/37696
Petri-Dish: Alexis La Goutte <alexis.lagoutte@xxxxxxxxx>
Reviewed-by: Anders Broman <a.broman58@xxxxxxxxx>
(cherry picked from commit 79576219c92e252c0700cdbe729bfb0fe6c72bd9)
Reviewed-on: https://code.wireshark.org/review/37720
Reviewed-by: Guy Harris <gharris@xxxxxxxxx>
Actions performed:
from 3bfc21b DVB-S2-BB: update list of standards.
add 76afda9 kafka: lz4: free the composite tvb only once
Summary of changes:
epan/dissectors/packet-kafka.c | 19 +++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)