From 53de2c23783788d92dc17d3dccfdc8b65ab0bf74 Mon Sep 17 00:00:00 2001 From: Pascal Quantin Date: Wed, 20 Jul 2016 23:54:35 +0200 Subject: Convert more glib memory to wmem pinfo pool Change-Id: I4cc23bc19a6bd8c6a8e0389eaf939dbb60fe0ca3 Reviewed-on: https://code.wireshark.org/review/16562 Reviewed-by: Pascal Quantin Petri-Dish: Pascal Quantin Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman --- plugins/irda/packet-sir.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'plugins/irda/packet-sir.c') diff --git a/plugins/irda/packet-sir.c b/plugins/irda/packet-sir.c index 11188a47bf..13534a7c5f 100644 --- a/plugins/irda/packet-sir.c +++ b/plugins/irda/packet-sir.c @@ -80,7 +80,7 @@ unescape_data(tvbuff_t *tvb, packet_info *pinfo) } else { guint length = tvb_captured_length(tvb); guint offset; - guint8 *data = (guint8 *)g_malloc(length); + guint8 *data = (guint8 *)wmem_alloc(pinfo->pool, length); guint8 *dst = data; tvbuff_t *next_tvb; @@ -93,7 +93,6 @@ unescape_data(tvbuff_t *tvb, packet_info *pinfo) } next_tvb = tvb_new_child_real_data(tvb, data, (guint) (dst-data), (guint) (dst-data)); - tvb_set_free_cb(next_tvb, g_free); add_new_data_source(pinfo, next_tvb, "Unescaped SIR"); return next_tvb; } -- cgit v1.2.1