forked from osmocom/wireshark
FTDI FT: Do not finalize empty composite tvb
Simply free RX tvb if there isn't any actual RX payload. Ping-Bug: 11743 Change-Id: I05b6818cf7889a44730c4d44980947cece65395e Reviewed-on: https://code.wireshark.org/review/37025 Petri-Dish: Tomasz Moń <desowin@gmail.com> Reviewed-by: Filipe Laíns <lains@archlinux.org> Tested-by: Petri Dish Buildbot Reviewed-by: Tomasz Moń <desowin@gmail.com>
This commit is contained in:
parent
bf3d14ca4e
commit
db717c2c01
|
@ -969,13 +969,17 @@ dissect_ftdi_ft(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
|
|||
}
|
||||
while (tvb_reported_length_remaining(tvb, offset) > 0);
|
||||
|
||||
tvb_composite_finalize(rx_tvb);
|
||||
if (total_rx_len > 0)
|
||||
{
|
||||
tvb_composite_finalize(rx_tvb);
|
||||
col_append_fstr(pinfo->cinfo, COL_INFO, " %d bytes", total_rx_len);
|
||||
add_new_data_source(pinfo, rx_tvb, "RX Payload");
|
||||
dissect_serial_payload(rx_tvb, 0, pinfo, tree, usb_conv_info, interface);
|
||||
}
|
||||
else
|
||||
{
|
||||
tvb_free_chain(rx_tvb);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue