diff options
author | Evan Huus <eapache@gmail.com> | 2021-09-15 12:09:18 -0400 |
---|---|---|
committer | Wireshark GitLab Utility <gerald+gitlab-utility@wireshark.org> | 2021-09-16 07:12:20 +0000 |
commit | e4b8a5851384f3cac5bb8cefa9d7f668f907d15d (patch) | |
tree | 49e5677de61f4c15f4123847f5b13f9a132192db /epan/dissectors/packet-mq.c | |
parent | f4aa108913db786e8dc4c2333849c8c07afebb2c (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-mq.c')
-rw-r--r-- | epan/dissectors/packet-mq.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/dissectors/packet-mq.c b/epan/dissectors/packet-mq.c index c006e3e44f..2f33364052 100644 --- a/epan/dissectors/packet-mq.c +++ b/epan/dissectors/packet-mq.c @@ -2538,7 +2538,7 @@ static void dissect_mq_pdu(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree) ptvcursor_t* cursor; mq_tree = proto_tree_add_subtree(mqroot_tree, tvb, offset, iSizeCONN, ett_mq_conn, NULL, MQ_TEXT_CONN); - cursor = ptvcursor_new(mq_tree, tvb, offset); + cursor = ptvcursor_new(pinfo->pool, mq_tree, tvb, offset); ptvcursor_add(cursor, hf_mq_conn_QMgr, 48, iEnc); ptvcursor_add(cursor, hf_mq_conn_appname, 28, iEnc); |