diff options
author | Evan Huus <eapache@gmail.com> | 2021-07-23 15:21:02 -0400 |
---|---|---|
committer | Wireshark GitLab Utility <gerald+gitlab-utility@wireshark.org> | 2021-07-26 15:30:11 +0000 |
commit | e69446aa55d293412002375a549e85327267e65b (patch) | |
tree | 784bba0753e5f961df780eb5c9c613828cefca83 /epan/dissectors/asn1/gsm_map | |
parent | 3467b98eb72f8971c83b25b920419b8d0d49016a (diff) |
asn1: convert most dissectors to pinfo->pool
Part 1/2 as the commits were too big for CI.
Largely find/replace, with a few manual tweaks. Then regenerate the asn1
dissector sources and make sure everything still builds. There are a
handful of cases I skipped as too complex, but this covers most of the
asn1 dissectors.
Diffstat (limited to 'epan/dissectors/asn1/gsm_map')
-rw-r--r-- | epan/dissectors/asn1/gsm_map/gsm_map.cnf | 2 | ||||
-rw-r--r-- | epan/dissectors/asn1/gsm_map/packet-gsm_map-template.c | 20 |
2 files changed, 11 insertions, 11 deletions
diff --git a/epan/dissectors/asn1/gsm_map/gsm_map.cnf b/epan/dissectors/asn1/gsm_map/gsm_map.cnf index cefba242f1..abe0ac0009 100644 --- a/epan/dissectors/asn1/gsm_map/gsm_map.cnf +++ b/epan/dissectors/asn1/gsm_map/gsm_map.cnf @@ -1090,7 +1090,7 @@ MAP interfaces return offset; subtree = proto_item_add_subtree(actx->created_item, ett_gsm_map_apn_str); - proto_tree_add_item_ret_string(subtree, hf_gsm_apn_str, parameter_tvb, 0, -1, ENC_APN_STR | ENC_NA, wmem_packet_scope(), &apn_str); + proto_tree_add_item_ret_string(subtree, hf_gsm_apn_str, parameter_tvb, 0, -1, ENC_APN_STR | ENC_NA, actx->pinfo->pool, &apn_str); proto_item_append_text(actx->created_item, " - %%s", apn_str); diff --git a/epan/dissectors/asn1/gsm_map/packet-gsm_map-template.c b/epan/dissectors/asn1/gsm_map/packet-gsm_map-template.c index f35bc1c574..38ab436ee5 100644 --- a/epan/dissectors/asn1/gsm_map/packet-gsm_map-template.c +++ b/epan/dissectors/asn1/gsm_map/packet-gsm_map-template.c @@ -570,9 +570,9 @@ dissect_gsm_map_ext2_qos_subscribed(tvbuff_t *tvb, packet_info *pinfo _U_, proto { temp32 = qos_calc_ext_bitrate(oct); if (temp32 % 1000 == 0) - str = wmem_strdup_printf(wmem_packet_scope(), "%u Mbps", temp32 / 1000); + str = wmem_strdup_printf(pinfo->pool, "%u Mbps", temp32 / 1000); else - str = wmem_strdup_printf(wmem_packet_scope(), "%u kbps", temp32); + str = wmem_strdup_printf(pinfo->pool, "%u kbps", temp32); } proto_tree_add_uint_format_value(subtree, hf_gsm_map_qos_max_bitrate_downl_ext, tvb, offset, 1, oct, "%s (%u)", str, oct); @@ -591,9 +591,9 @@ dissect_gsm_map_ext2_qos_subscribed(tvbuff_t *tvb, packet_info *pinfo _U_, proto { temp32 = qos_calc_ext_bitrate(oct); if (temp32 % 1000 == 0) - str = wmem_strdup_printf(wmem_packet_scope(), "%u Mbps", temp32 / 1000); + str = wmem_strdup_printf(pinfo->pool, "%u Mbps", temp32 / 1000); else - str = wmem_strdup_printf(wmem_packet_scope(), "%u kbps", temp32); + str = wmem_strdup_printf(pinfo->pool, "%u kbps", temp32); } proto_tree_add_uint_format_value(subtree, hf_gsm_map_qos_guar_bitrate_downl_ext, tvb, offset, 1, oct, "%s (%u)", str, oct); @@ -626,9 +626,9 @@ dissect_gsm_map_ext3_qos_subscribed(tvbuff_t *tvb, packet_info *pinfo _U_, proto { temp32 = qos_calc_ext_bitrate(oct); if (temp32 % 1000 == 0) - str = wmem_strdup_printf(wmem_packet_scope(), "%u Mbps", temp32 / 1000); + str = wmem_strdup_printf(pinfo->pool, "%u Mbps", temp32 / 1000); else - str = wmem_strdup_printf(wmem_packet_scope(), "%u kbps", temp32); + str = wmem_strdup_printf(pinfo->pool, "%u kbps", temp32); } proto_tree_add_uint_format_value(subtree, hf_gsm_map_qos_max_bitrate_upl_ext, tvb, offset, 1, oct, "%s (%u)", str, oct); @@ -647,9 +647,9 @@ dissect_gsm_map_ext3_qos_subscribed(tvbuff_t *tvb, packet_info *pinfo _U_, proto { temp32 = qos_calc_ext_bitrate(oct); if (temp32 % 1000 == 0) - str = wmem_strdup_printf(wmem_packet_scope(), "%u Mbps", temp32 / 1000); + str = wmem_strdup_printf(pinfo->pool, "%u Mbps", temp32 / 1000); else - str = wmem_strdup_printf(wmem_packet_scope(), "%u kbps", temp32); + str = wmem_strdup_printf(pinfo->pool, "%u kbps", temp32); } proto_tree_add_uint_format_value(subtree, hf_gsm_map_qos_guar_bitrate_upl_ext, tvb, offset, 1, oct, "%s (%u)", str, oct); @@ -2359,7 +2359,7 @@ dissect_gsm_map(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void asn1_ctx.subtree.top_tree = parent_tree; - gsm_map_priv = wmem_new0(wmem_packet_scope(), gsm_map_private_info_t); + gsm_map_priv = wmem_new0(pinfo->pool, gsm_map_private_info_t); gsm_map_priv->tcap_private = (struct tcap_private_t *)data; asn1_ctx.value_ptr = gsm_map_priv; @@ -2398,7 +2398,7 @@ dissect_gsm_map_sccp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, asn1_ctx.subtree.top_tree = parent_tree; - gsm_map_priv = wmem_new0(wmem_packet_scope(), gsm_map_private_info_t); + gsm_map_priv = wmem_new0(pinfo->pool, gsm_map_private_info_t); gsm_map_priv->sccp_msg_info = (sccp_msg_info_t *)data; asn1_ctx.value_ptr = gsm_map_priv; |