aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorPascal Quantin <pascal.quantin@gmail.com>2015-11-19 16:19:36 +0100
committerPascal Quantin <pascal.quantin@gmail.com>2015-11-19 17:03:13 +0000
commitcf562210de8997813abf624de36a5a70d73ac421 (patch)
tree6848731405139735a8f51a6db36c60c4098c8baa /plugins
parentb61e20551659858ad4419d25d04d0dcd8497c77b (diff)
Profinet: use pinfo pool to build conversation filter
Packet pool cannot be used from GUI. Bug: 11730 Change-Id: I4f5764a38a10809373c365ecf1ea50404a15b89a Reviewed-on: https://code.wireshark.org/review/11966 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Diffstat (limited to 'plugins')
-rw-r--r--plugins/profinet/packet-dcerpc-pn-io.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/plugins/profinet/packet-dcerpc-pn-io.c b/plugins/profinet/packet-dcerpc-pn-io.c
index 72fbf08ec0..bf795e4003 100644
--- a/plugins/profinet/packet-dcerpc-pn-io.c
+++ b/plugins/profinet/packet-dcerpc-pn-io.c
@@ -9679,7 +9679,7 @@ pn_io_ar_conv_filter(packet_info *pinfo)
{
pnio_ar_t *ar = (pnio_ar_t *)p_get_proto_data(wmem_file_scope(), pinfo, proto_pn_io, 0);
void* profinet_type = p_get_proto_data(pinfo->pool, pinfo, proto_pn_io, 0);
- char *buf, *guid_str;
+ char *buf;
address controllermac_addr, devicemac_addr;
if ((profinet_type == NULL) || (GPOINTER_TO_UINT(profinet_type) != 10) || (ar == NULL)) {
@@ -9689,15 +9689,13 @@ pn_io_ar_conv_filter(packet_info *pinfo)
set_address(&controllermac_addr, AT_ETHER, 6, ar->controllermac);
set_address(&devicemac_addr, AT_ETHER, 6, ar->devicemac);
- guid_str = guid_to_str(wmem_packet_scope(), (const e_guid_t*) &ar->aruuid);
buf = g_strdup_printf(
"pn_io.ar_uuid == %s || " /* ARUUID */
"(pn_io.alarm_src_endpoint == 0x%x && eth.src == %s) || " /* Alarm CR (contr -> dev) */
"(pn_io.alarm_src_endpoint == 0x%x && eth.src == %s)", /* Alarm CR (dev -> contr) */
- guid_str,
- ar->controlleralarmref, address_to_str(wmem_packet_scope(), &controllermac_addr),
- ar->devicealarmref, address_to_str(wmem_packet_scope(), &devicemac_addr));
- wmem_free(NULL, guid_str);
+ guid_to_str(pinfo->pool, (const e_guid_t*) &ar->aruuid),
+ ar->controlleralarmref, address_to_str(pinfo->pool, &controllermac_addr),
+ ar->devicealarmref, address_to_str(pinfo->pool, &devicemac_addr));
return buf;
}
@@ -9716,9 +9714,9 @@ pn_io_ar_conv_data_filter(packet_info *pinfo)
set_address(&controllermac_addr, AT_ETHER, 6, ar->controllermac);
set_address(&devicemac_addr, AT_ETHER, 6, ar->devicemac);
- controllermac_str = address_to_str(wmem_packet_scope(), &controllermac_addr);
- devicemac_str = address_to_str(wmem_packet_scope(), &devicemac_addr);
- guid_str = guid_to_str(wmem_packet_scope(), (const e_guid_t*) &ar->aruuid);
+ controllermac_str = address_to_str(pinfo->pool, &controllermac_addr);
+ devicemac_str = address_to_str(pinfo->pool, &devicemac_addr);
+ guid_str = guid_to_str(pinfo->pool, (const e_guid_t*) &ar->aruuid);
if (ar->arType == 0x0010) /* IOCARSingle using RT_CLASS_3 */
{
buf = g_strdup_printf(