|
|
164878 |
diff --git a/epan/dissectors/packet-steam-ihs-discovery.c b/epan/dissectors/packet-steam-ihs-discovery.c
|
|
|
164878 |
index 1bec81e594..9d238f4e88 100644
|
|
|
164878 |
--- a/epan/dissectors/packet-steam-ihs-discovery.c
|
|
|
164878 |
+++ b/epan/dissectors/packet-steam-ihs-discovery.c
|
|
|
164878 |
@@ -491,9 +491,7 @@ steamdiscover_dissect_body_status(tvbuff_t *tvb, packet_info *pinfo, proto_tree
|
|
|
164878 |
protobuf_desc_t pb = { tvb, offset, bytes_left };
|
|
|
164878 |
protobuf_desc_t pb2 = { tvb, 0, 0 };
|
|
|
164878 |
protobuf_tag_t tag = { 0, 0, 0 };
|
|
|
164878 |
- wmem_allocator_t* strpool;
|
|
|
164878 |
guint8 *hostname;
|
|
|
164878 |
- strpool = wmem_allocator_new(WMEM_ALLOCATOR_SIMPLE);
|
|
|
164878 |
nstime_t timestamp;
|
|
|
164878 |
proto_tree *user_tree;
|
|
|
164878 |
proto_item *user_it;
|
|
|
164878 |
@@ -522,7 +520,7 @@ steamdiscover_dissect_body_status(tvbuff_t *tvb, packet_info *pinfo, proto_tree
|
|
|
164878 |
value = get_varint64(pb.tvb, pb.offset, pb.bytes_left, &len;;
|
|
|
164878 |
proto_tree_add_item(tree, hf_steam_ihs_discovery_body_status_hostname, pb.tvb,
|
|
|
164878 |
pb.offset+len, (gint)value, ENC_UTF_8|ENC_NA);
|
|
|
164878 |
- hostname = tvb_get_string_enc(strpool, pb.tvb, pb.offset+len, (gint)value, ENC_UTF_8);
|
|
|
164878 |
+ hostname = tvb_get_string_enc(wmem_packet_scope(), pb.tvb, pb.offset+len, (gint)value, ENC_UTF_8);
|
|
|
164878 |
if(hostname && strlen(hostname)) {
|
|
|
164878 |
col_add_fstr(pinfo->cinfo, COL_INFO, "%s from %s", hf_steam_ihs_discovery_header_msgtype_strings[STEAMDISCOVER_MSGTYPE_CLIENTBROADCASTMSGSTATUS].strptr, hostname);
|
|
|
164878 |
}
|
|
|
164878 |
@@ -615,7 +613,6 @@ steamdiscover_dissect_body_status(tvbuff_t *tvb, packet_info *pinfo, proto_tree
|
|
|
164878 |
}
|
|
|
164878 |
protobuf_seek_forward(&pb, len);
|
|
|
164878 |
}
|
|
|
164878 |
- wmem_destroy_allocator(strpool);
|
|
|
164878 |
}
|
|
|
164878 |
|
|
|
164878 |
/* Dissect a CMsgRemoteDeviceAuthorizationRequest protobuf message body.
|
|
|
164878 |
@@ -648,8 +645,6 @@ steamdiscover_dissect_body_authrequest(tvbuff_t *tvb, packet_info *pinfo, proto_
|
|
|
164878 |
gint64 value;
|
|
|
164878 |
protobuf_desc_t pb = { tvb, offset, bytes_left };
|
|
|
164878 |
protobuf_tag_t tag = { 0, 0, 0 };
|
|
|
164878 |
- wmem_allocator_t *strpool;
|
|
|
164878 |
- strpool = wmem_allocator_new(WMEM_ALLOCATOR_SIMPLE);
|
|
|
164878 |
guint8* devicename;
|
|
|
164878 |
while (protobuf_iter_next(&pb, &tag)) {
|
|
|
164878 |
switch(tag.field_number) {
|
|
|
164878 |
@@ -665,7 +660,7 @@ steamdiscover_dissect_body_authrequest(tvbuff_t *tvb, packet_info *pinfo, proto_
|
|
|
164878 |
value = get_varint64(pb.tvb, pb.offset, pb.bytes_left, &len;;
|
|
|
164878 |
proto_tree_add_item(tree, hf_steam_ihs_discovery_body_authrequest_devicename, pb.tvb,
|
|
|
164878 |
pb.offset+len, (gint)value, ENC_UTF_8|ENC_NA);
|
|
|
164878 |
- devicename = tvb_get_string_enc(strpool, pb.tvb, pb.offset+len, (gint)value, ENC_UTF_8);
|
|
|
164878 |
+ devicename = tvb_get_string_enc(wmem_packet_scope(), pb.tvb, pb.offset+len, (gint)value, ENC_UTF_8);
|
|
|
164878 |
if (devicename && strlen(devicename)) {
|
|
|
164878 |
col_append_fstr(pinfo->cinfo, COL_INFO, " from %s", devicename);
|
|
|
164878 |
}
|
|
|
164878 |
@@ -684,7 +679,6 @@ steamdiscover_dissect_body_authrequest(tvbuff_t *tvb, packet_info *pinfo, proto_
|
|
|
164878 |
}
|
|
|
164878 |
protobuf_seek_forward(&pb, len);
|
|
|
164878 |
}
|
|
|
164878 |
- wmem_destroy_allocator(strpool);
|
|
|
164878 |
}
|
|
|
164878 |
|
|
|
164878 |
/* Dissect a CMsgRemoteDeviceAuthorizationResponse protobuf message body.
|