aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-arinc615a.c
diff options
context:
space:
mode:
authorEvan Huus <eapache@gmail.com>2021-09-15 12:09:18 -0400
committerWireshark GitLab Utility <gerald+gitlab-utility@wireshark.org>2021-09-16 07:12:20 +0000
commite4b8a5851384f3cac5bb8cefa9d7f668f907d15d (patch)
tree49e5677de61f4c15f4123847f5b13f9a132192db /epan/dissectors/packet-arinc615a.c
parentf4aa108913db786e8dc4c2333849c8c07afebb2c (diff)
ptvcursor: add explicit memory scope
I was hoping to avoid this, since the ptvcursor should already be implicitly scoped to the tree it is working on. But there are a bunch of call sites where the passed tree can be NULL (?) and a few places where the tree is explicitly set/reset after creation, so requiring an explicit scope is safer. Avoids global memory pools in favour of ones the compiler can verify.
Diffstat (limited to 'epan/dissectors/packet-arinc615a.c')
-rw-r--r--epan/dissectors/packet-arinc615a.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/dissectors/packet-arinc615a.c b/epan/dissectors/packet-arinc615a.c
index 17cc83460a..761160c046 100644
--- a/epan/dissectors/packet-arinc615a.c
+++ b/epan/dissectors/packet-arinc615a.c
@@ -263,7 +263,7 @@ static void dissect_a615a_protocol_file(tvbuff_t *tvb, packet_info *pinfo, proto
ti = proto_tree_add_string(a615a_tree, hf_a615a_file_type, tvb, 0, 0, a615a_file[suffix].full);
proto_item_set_generated(ti);
- ptvcursor_t *ptvc = ptvcursor_new(a615a_tree, tvb, 0);
+ ptvcursor_t *ptvc = ptvcursor_new(pinfo->pool, a615a_tree, tvb, 0);
ptvcursor_add(ptvc, hf_a615a_file_length, 4, ENC_BIG_ENDIAN);
ptvcursor_add(ptvc, hf_a615a_protocol_version, 2, ENC_ASCII | ENC_NA);
@@ -343,7 +343,7 @@ static int dissect_find(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, voi
proto_item *ti = proto_tree_add_item(tree, proto_find, tvb, 0, -1, ENC_NA);
proto_tree *find_tree = proto_item_add_subtree(ti, ett_find);
- ptvcursor_t *ptvc = ptvcursor_new(find_tree, tvb, 0);
+ ptvcursor_t *ptvc = ptvcursor_new(pinfo->pool, find_tree, tvb, 0);
guint32 opcode;
ptvcursor_add_ret_uint(ptvc, hf_find_opcode, 2, ENC_BIG_ENDIAN, &opcode);