ip: ip_ttl _ws.expert fields not set if no tree

See 'if (tree) ...' comment
Closes #17228
This commit is contained in:
Chuck Craft 2021-02-14 16:02:11 -06:00 committed by Wireshark GitLab Utility
parent 996bdc37bf
commit dde65b96cd
1 changed files with 1 additions and 5 deletions

View File

@ -2023,11 +2023,7 @@ dissect_ip_v4(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void*
tf = proto_tree_add_uint(ip_tree, hf_ip_frag_offset, tvb, offset + 6, 2, (iph->ip_off & IP_OFFSET)*8);
iph->ip_ttl = tvb_get_guint8(tvb, offset + 8);
if (tree) {
ttl_item = proto_tree_add_item(ip_tree, hf_ip_ttl, tvb, offset + 8, 1, ENC_BIG_ENDIAN);
} else {
ttl_item = NULL;
}
ttl_item = proto_tree_add_item(ip_tree, hf_ip_ttl, tvb, offset + 8, 1, ENC_BIG_ENDIAN);
iph->ip_proto = tvb_get_guint8(tvb, offset + 9);
if (tree) {