Use pinfo pool and not packet pool for AT_STRINGZ addresses

Change-Id: I474e6554b352147702eac32d5574f8ab4a1ab84d
Reviewed-on: https://code.wireshark.org/review/9745
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
Pascal Quantin 2015-07-21 23:59:18 +02:00 committed by Anders Broman
parent 120ed14f34
commit 3f0f49df66
3 changed files with 8 additions and 8 deletions

View File

@ -355,7 +355,7 @@ dissect_dbus_sig(tvbuff_t *tvb, dbus_info_t *dinfo, proto_tree *tree, int offset
}
static int
dissect_dbus_field_signature(tvbuff_t *tvb, dbus_info_t *dinfo, proto_tree *tree, int offset, int field_code)
dissect_dbus_field_signature(tvbuff_t *tvb, packet_info *pinfo, dbus_info_t *dinfo, proto_tree *tree, int offset, int field_code)
{
const int org_offset = offset;
@ -397,7 +397,7 @@ dissect_dbus_field_signature(tvbuff_t *tvb, dbus_info_t *dinfo, proto_tree *tree
offset = dissect_dbus_sig(tvb, dinfo, tree, offset, 's', &addr_val);
if (offset != -1)
SET_ADDRESS((field_code == DBUS_HEADER_FIELD_DESTINATION) ? &dinfo->pinfo->dst : &dinfo->pinfo->src,
AT_STRINGZ, (int)strlen(addr_val.str)+1, addr_val.str);
AT_STRINGZ, (int)strlen(addr_val.str)+1, wmem_strdup(pinfo->pool, addr_val.str));
return offset;
}
break;
@ -426,7 +426,7 @@ dissect_dbus_field_signature(tvbuff_t *tvb, dbus_info_t *dinfo, proto_tree *tree
}
static int
dissect_dbus_hdr_fields(tvbuff_t *tvb, dbus_info_t *dinfo, proto_tree *tree, int offset)
dissect_dbus_hdr_fields(tvbuff_t *tvb, packet_info *pinfo, dbus_info_t *dinfo, proto_tree *tree, int offset)
{
int end_offset;
@ -446,7 +446,7 @@ dissect_dbus_hdr_fields(tvbuff_t *tvb, dbus_info_t *dinfo, proto_tree *tree, int
proto_item_append_text(ti, ": %s", val_to_str(field_code, field_code_vals, "Unknown: %d"));
offset += 1;
offset = dissect_dbus_field_signature(tvb, dinfo, field_tree, offset, field_code);
offset = dissect_dbus_field_signature(tvb, pinfo, dinfo, field_tree, offset, field_code);
if (offset == -1)
break;
@ -573,7 +573,7 @@ dissect_dbus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_
offset = 0;
offset = dissect_dbus_hdr(tvb, &dinfo, dbus_tree, offset);
offset = dissect_dbus_hdr_fields(tvb, &dinfo, dbus_tree, offset);
offset = dissect_dbus_hdr_fields(tvb, pinfo, &dinfo, dbus_tree, offset);
/* header aligned to 8B */
offset = (offset + 7) & ~7;

View File

@ -1615,7 +1615,7 @@ dissect_sccp_gt_address_information(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *digits_tree;
char *gt_digits;
gt_digits = (char *)wmem_alloc0(wmem_packet_scope(), GT_MAX_SIGNALS+1);
gt_digits = (char *)wmem_alloc0(pinfo->pool, GT_MAX_SIGNALS+1);
while (offset < length) {
odd_signal = tvb_get_guint8(tvb, offset) & GT_ODD_SIGNAL_MASK;

View File

@ -2246,9 +2246,9 @@ dissect_sua_message(tvbuff_t *message_tvb, packet_info *pinfo, proto_tree *sua_t
SET_ADDRESS(&pinfo->dst, AT_SS7PC, sizeof(mtp3_addr_pc_t), (guint8 *) sua_dpc);
if (sua_source_gt)
SET_ADDRESS(&pinfo->src, AT_STRINGZ, 1+(int)strlen(sua_source_gt), sua_source_gt);
SET_ADDRESS(&pinfo->src, AT_STRINGZ, 1+(int)strlen(sua_source_gt), wmem_strdup(pinfo->pool, sua_source_gt));
if (sua_destination_gt)
SET_ADDRESS(&pinfo->dst, AT_STRINGZ, 1+(int)strlen(sua_destination_gt), sua_destination_gt);
SET_ADDRESS(&pinfo->dst, AT_STRINGZ, 1+(int)strlen(sua_destination_gt), wmem_strdup(pinfo->pool, sua_destination_gt));
}
/* If there was SUA data it could be dissected */