diff options
-rw-r--r-- | epan/dissectors/packet-btavrcp.c | 10 | ||||
-rw-r--r-- | epan/dissectors/packet-bthcrp.c | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-nfs.c | 8 |
3 files changed, 9 insertions, 11 deletions
diff --git a/epan/dissectors/packet-btavrcp.c b/epan/dissectors/packet-btavrcp.c index 22fcdfbde3..98223092d2 100644 --- a/epan/dissectors/packet-btavrcp.c +++ b/epan/dissectors/packet-btavrcp.c @@ -634,7 +634,7 @@ dissect_attribute_entries(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, for (i_entry = 0; i_entry < count; ++i_entry) { attribute_id = tvb_get_ntohl(tvb, offset); value_length = tvb_get_ntohs(tvb, offset + 4 + 2); - value = tvb_get_string(NULL, tvb, offset + 4 + 2 + 2, value_length); + value = tvb_get_string(wmem_packet_scope(), tvb, offset + 4 + 2 + 2, value_length); if (attribute_id == 0x01) col_append_fstr(pinfo->cinfo, COL_INFO, " - Title: \"%s\"", value); @@ -672,7 +672,7 @@ dissect_item_mediaplayer(tvbuff_t *tvb, proto_tree *tree, gint offset) item_length = tvb_get_ntohs(tvb, offset + 1); displayable_name_length = tvb_get_ntohs(tvb, offset + 1 + 2 + 1 + 1 + 4 + 16 + 1 + 2); - displayable_name = tvb_get_string(NULL, tvb, offset + 1 + 2 + 1 + 1 + 4 + 16 + 1 + 2 + 2, displayable_name_length); + displayable_name = tvb_get_string(wmem_packet_scope(), tvb, offset + 1 + 2 + 1 + 1 + 4 + 16 + 1 + 2 + 2, displayable_name_length); pitem = proto_tree_add_none_format(tree, hf_btavrcp_player_item, tvb, offset, 1 + 2 + item_length, "Player: %s", displayable_name); ptree = proto_item_add_subtree(pitem, ett_btavrcp_player); @@ -834,7 +834,7 @@ dissect_item_media_element(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, item_length = tvb_get_ntohs(tvb, offset + 1); displayable_name_length = tvb_get_ntohs(tvb, offset + 1 + 2 + 8 + 1 + 2); - displayable_name = tvb_get_string(NULL, tvb, offset + 1 + 2 + 8 + 1 + 2 + 2, displayable_name_length); + displayable_name = tvb_get_string(wmem_packet_scope(), tvb, offset + 1 + 2 + 8 + 1 + 2 + 2, displayable_name_length); pitem = proto_tree_add_none_format(tree, hf_btavrcp_item , tvb, offset, 1 + 2 + item_length, "Element: %s", displayable_name); ptree = proto_item_add_subtree(pitem, ett_btavrcp_element); @@ -886,7 +886,7 @@ dissect_item_folder(tvbuff_t *tvb, proto_tree *tree, gint offset) item_length = tvb_get_ntohs(tvb, offset + 1); displayable_name_length = tvb_get_ntohs(tvb, offset + 1 + 2 + 8 + 1 + 1 + 2); - displayable_name = tvb_get_string(NULL, tvb, offset + 1 + 2 + 8 + 1 + 1 + 2 + 2, displayable_name_length); + displayable_name = tvb_get_string(wmem_packet_scope(), tvb, offset + 1 + 2 + 8 + 1 + 1 + 2 + 2, displayable_name_length); pitem = proto_tree_add_none_format(tree, hf_btavrcp_folder, tvb, offset, 1 + 2 + item_length, "Folder : %s", displayable_name); ptree = proto_item_add_subtree(pitem, ett_btavrcp_folder); @@ -1909,7 +1909,7 @@ dissect_browsing(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, folder_name_length = tvb_get_ntohs(tvb, offset); offset += 2; proto_tree_add_item(ptree, hf_btavrcp_folder_name, tvb, offset, folder_name_length, ENC_NA); - folder_name = tvb_get_string(NULL, tvb, offset, folder_name_length); + folder_name = tvb_get_string(wmem_packet_scope(), tvb, offset, folder_name_length); offset += folder_name_length; proto_item_append_text(pitem, "%s/", folder_name); col_append_fstr(pinfo->cinfo, COL_INFO, "%s/", folder_name); diff --git a/epan/dissectors/packet-bthcrp.c b/epan/dissectors/packet-bthcrp.c index 8089139b7b..3c39cf5bba 100644 --- a/epan/dissectors/packet-bthcrp.c +++ b/epan/dissectors/packet-bthcrp.c @@ -249,7 +249,7 @@ dissect_control(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint8 *id; proto_tree_add_item(tree, hf_bthcrp_control_1284_id, tvb, offset, -1, ENC_ASCII | ENC_NA); - id = tvb_get_string(NULL, tvb, offset, tvb_length_remaining(tvb, offset)); + id = tvb_get_string(wmem_packet_scope(), tvb, offset, tvb_length_remaining(tvb, offset)); col_append_fstr(pinfo->cinfo, COL_INFO, " - 1284 ID: %s", id); offset += tvb_length_remaining(tvb, offset); } diff --git a/epan/dissectors/packet-nfs.c b/epan/dissectors/packet-nfs.c index 2340bb418a..8df917de07 100644 --- a/epan/dissectors/packet-nfs.c +++ b/epan/dissectors/packet-nfs.c @@ -2187,7 +2187,7 @@ dissect_fhandle_data_GLUSTER(tvbuff_t* tvb, packet_info *pinfo _U_, proto_tree * if (fhlen != 36) return; - ident = tvb_get_string(NULL, tvb, offset, 4); + ident = tvb_get_string(wmem_packet_scope(), tvb, offset, 4); if (strncmp(":OGL", ident, 4)) return; offset += 4; @@ -2371,9 +2371,8 @@ dissect_fhandle_data(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree * guint8 *fh_array; proto_item *fh_item = NULL; - fh_array = tvb_get_string(NULL, tvb, offset, fhlen); + fh_array = tvb_get_string(wmem_packet_scope(), tvb, offset, fhlen); fhhash = crc32_ccitt(fh_array, fhlen); - g_free(fh_array); if (hidden) { fh_item = proto_tree_add_uint(tree, hf_nfs_fh_hash, NULL, 0, @@ -8028,9 +8027,8 @@ dissect_nfs4_stateid(tvbuff_t *tvb, int offset, proto_tree *tree, guint16 *hash) newftree = proto_item_add_subtree(fitem, ett_nfs4_stateid); } - sidh_array = tvb_get_string(NULL, tvb, offset, 16); + sidh_array = tvb_get_string(wmem_packet_scope(), tvb, offset, 16); sid_hash = crc16_ccitt(sidh_array, 16); - g_free(sidh_array); sh_item = proto_tree_add_uint(newftree, hf_nfs4_stateid_hash, tvb, offset, 16, sid_hash); PROTO_ITEM_SET_GENERATED(sh_item); |