aboutsummaryrefslogtreecommitdiffstats
path: root/epan/ptvcursor.h
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/ptvcursor.h
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/ptvcursor.h')
-rw-r--r--epan/ptvcursor.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/ptvcursor.h b/epan/ptvcursor.h
index 46c5685b9e..ab4fcb6c06 100644
--- a/epan/ptvcursor.h
+++ b/epan/ptvcursor.h
@@ -25,7 +25,7 @@ typedef struct ptvcursor ptvcursor_t;
* proto_tree, tvbuff, and offset. */
WS_DLL_PUBLIC
ptvcursor_t*
-ptvcursor_new(proto_tree* tree, tvbuff_t* tvb, gint offset);
+ptvcursor_new(wmem_allocator_t *scope, proto_tree* tree, tvbuff_t* tvb, gint offset);
/* Gets data from tvbuff, adds it to proto_tree, increments offset,
* and returns proto_item* */