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

See 'if (tree) ...' comment
Closes #17228


(cherry picked from commit dde65b96cd)
This commit is contained in:
Chuck Craft 2021-02-14 22:02:11 +00:00 committed by Pascal Quantin
parent 24b27195f1
commit 418c3360bf
1 changed files with 1 additions and 5 deletions

View File

@ -2025,11 +2025,7 @@ dissect_ip_v4(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void*
proto_item_set_bits_offset_len(tf, 3, 13);
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) {