diff options
author | Evan Huus <eapache@gmail.com> | 2021-08-27 14:56:00 -0400 |
---|---|---|
committer | AndersBroman <a.broman58@gmail.com> | 2021-09-01 03:54:52 +0000 |
commit | cdfab0d6e991df2fd3591ef896ba36937a8d4dfc (patch) | |
tree | 180c49932c562eb644c5f24d6c8d8cbf13a936e3 /epan/dissectors/packet-fefd.c | |
parent | 61e66c37abb1b7f59726e4407ac8dd53e6b75cac (diff) |
tvbuff: convert helper methods to pinfo->pool
A few of them just needed scratch memory, so allocate and free it
manually after doing any exception-raising checks.
A few others were returning memory, and needed conversion to accept a
wmem scope argument.
Diffstat (limited to 'epan/dissectors/packet-fefd.c')
-rw-r--r-- | epan/dissectors/packet-fefd.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/epan/dissectors/packet-fefd.c b/epan/dissectors/packet-fefd.c index 7901df8714..7ef3cdfbb9 100644 --- a/epan/dissectors/packet-fefd.c +++ b/epan/dissectors/packet-fefd.c @@ -131,13 +131,13 @@ dissect_fefd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_ col_append_sep_fstr(pinfo->cinfo, COL_INFO, NULL, "Device ID: %s", - tvb_format_stringzpad(tvb, offset + 4, + tvb_format_stringzpad(pinfo->pool, tvb, offset + 4, length - 4)); if (tree) { tlv_tree = proto_tree_add_subtree_format(fefd_tree, tvb, offset, length, ett_fefd_tlv, NULL, "Device ID: %s", - tvb_format_stringzpad(tvb, offset + 4, length - 4)); + tvb_format_stringzpad(pinfo->pool, tvb, offset + 4, length - 4)); proto_tree_add_uint(tlv_tree, hf_fefd_tlvtype, tvb, offset + TLV_TYPE, 2, type); proto_tree_add_uint(tlv_tree, hf_fefd_tlvlength, tvb, @@ -162,12 +162,12 @@ dissect_fefd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_ col_append_sep_fstr(pinfo->cinfo, COL_INFO, NULL, "Port ID: %s", - tvb_format_stringzpad(tvb, offset + 4, real_length - 4)); + tvb_format_stringzpad(pinfo->pool, tvb, offset + 4, real_length - 4)); if (tree) { tlv_tree = proto_tree_add_subtree_format(fefd_tree, tvb, offset, real_length, ett_fefd_tlv, NULL, "Port ID: %s", - tvb_format_text(tvb, offset + 4, real_length - 4)); + tvb_format_text(pinfo->pool, tvb, offset + 4, real_length - 4)); proto_tree_add_uint(tlv_tree, hf_fefd_tlvtype, tvb, offset + TLV_TYPE, 2, type); proto_tree_add_uint(tlv_tree, hf_fefd_tlvlength, tvb, |