aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-teamspeak2.c
diff options
context:
space:
mode:
authorDavid Perry <boolean263@protonmail.com>2021-07-27 21:36:43 +0000
committerWireshark GitLab Utility <6629907-ws-gitlab-utility@users.noreply.gitlab.com>2021-07-27 21:36:43 +0000
commit6e8c7283d6f93b2dde6f16301c0f280a6cf7f481 (patch)
tree1dccd550de229eebeb619999238ce11fe57c7276 /epan/dissectors/packet-teamspeak2.c
parent6d8bfc146d5bbe2c0ddc759757a8f9cf83c7b66d (diff)
Change some `wmem_packet_scope()` to `pinfo->pool`
Diffstat (limited to 'epan/dissectors/packet-teamspeak2.c')
-rw-r--r--epan/dissectors/packet-teamspeak2.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/epan/dissectors/packet-teamspeak2.c b/epan/dissectors/packet-teamspeak2.c
index dc38f30026..4868ccbab0 100644
--- a/epan/dissectors/packet-teamspeak2.c
+++ b/epan/dissectors/packet-teamspeak2.c
@@ -298,7 +298,7 @@ static reassembly_table msg_reassembly_table;
/* forward reference */
static void ts2_add_checked_crc32(proto_tree *tree, int hf_item, int hf_item_status, expert_field* ei_item, tvbuff_t *tvb, packet_info *pinfo, guint16 offset);
static void ts2_parse_playerlist(tvbuff_t *tvb, proto_tree *ts2_tree);
-static void ts2_parse_channellist(tvbuff_t *tvb, proto_tree *ts2_tree);
+static void ts2_parse_channellist(tvbuff_t *tvb, proto_tree *ts2_tree, wmem_allocator_t *pool);
static void ts2_parse_newplayerjoined(tvbuff_t *tvb, proto_tree *ts2_tree);
static void ts2_parse_knownplayerupdate(tvbuff_t *tvb, proto_tree *ts2_tree);
static void ts2_parse_playerleft(tvbuff_t *tvb, proto_tree *ts2_tree);
@@ -451,7 +451,7 @@ static void ts2_standard_dissect(tvbuff_t *tvb, packet_info *pinfo, proto_tree *
ts2_parse_loginpart2(next_tvb, ts2_tree);
break;
case TS2T_CHANNELLIST:
- ts2_parse_channellist(next_tvb, ts2_tree);
+ ts2_parse_channellist(next_tvb, ts2_tree, pinfo->pool);
break;
case TS2T_PLAYERLIST:
ts2_parse_playerlist(next_tvb, ts2_tree);
@@ -587,7 +587,7 @@ static void ts2_parse_loginpart2(tvbuff_t *tvb, proto_tree *ts2_tree)
}
/* Parses a ts2 channel list (TS2T_CHANNELLIST) and adds it to the tree */
-static void ts2_parse_channellist(tvbuff_t *tvb, proto_tree *ts2_tree)
+static void ts2_parse_channellist(tvbuff_t *tvb, proto_tree *ts2_tree, wmem_allocator_t *pool)
{
gint32 offset;
guint32 string_len;
@@ -622,13 +622,13 @@ static void ts2_parse_channellist(tvbuff_t *tvb, proto_tree *ts2_tree)
offset+=2;
proto_tree_add_item(ts2_tree, hf_ts2_max_users, tvb, offset, 2, ENC_LITTLE_ENDIAN);
offset+=2;
- tvb_get_stringz_enc(wmem_packet_scope(), tvb, offset, &string_len, ENC_ASCII);
+ tvb_get_stringz_enc(pool, tvb, offset, &string_len, ENC_ASCII);
proto_tree_add_item(ts2_tree, hf_ts2_channel_name, tvb, offset, string_len, ENC_ASCII|ENC_NA);
offset+=string_len;
- tvb_get_stringz_enc(wmem_packet_scope(), tvb, offset, &string_len, ENC_ASCII);
+ tvb_get_stringz_enc(pool, tvb, offset, &string_len, ENC_ASCII);
proto_tree_add_item(ts2_tree, hf_ts2_channel_topic, tvb, offset, string_len, ENC_ASCII|ENC_NA);
offset+=string_len;
- tvb_get_stringz_enc(wmem_packet_scope(), tvb, offset, &string_len, ENC_ASCII);
+ tvb_get_stringz_enc(pool, tvb, offset, &string_len, ENC_ASCII);
proto_tree_add_item(ts2_tree, hf_ts2_channel_description, tvb, offset, string_len, ENC_ASCII|ENC_NA);
offset+=string_len;
}