aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-lapd.c
diff options
context:
space:
mode:
authorPascal Quantin <pascal.quantin@gmail.com>2016-07-20 23:54:35 +0200
committerAnders Broman <a.broman58@gmail.com>2016-07-22 06:21:54 +0000
commit53de2c23783788d92dc17d3dccfdc8b65ab0bf74 (patch)
tree2395270e27575e7261eda4bc9118daed12b69f90 /epan/dissectors/packet-lapd.c
parentb2e4a7e21ce7ee8fee857ee71d51ad1ec13feb2e (diff)
Convert more glib memory to wmem pinfo pool
Change-Id: I4cc23bc19a6bd8c6a8e0389eaf939dbb60fe0ca3 Reviewed-on: https://code.wireshark.org/review/16562 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>
Diffstat (limited to 'epan/dissectors/packet-lapd.c')
-rw-r--r--epan/dissectors/packet-lapd.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/epan/dissectors/packet-lapd.c b/epan/dissectors/packet-lapd.c
index 8f782c0aad..2f887fd8fc 100644
--- a/epan/dissectors/packet-lapd.c
+++ b/epan/dissectors/packet-lapd.c
@@ -298,10 +298,9 @@ dissect_lapd_bitstream(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void
if (ones == 5 && state == DATA) {
/* we don't increase bit_offset, it is an inserted zero */
} else if (ones == 6 && state == DATA) { /* probably starting flag sequence */
- buff = (guint8 *)g_memdup(data, data_len);
+ buff = (guint8 *)wmem_memdup(pinfo->pool, data, data_len);
/* Allocate new tvb for the LAPD frame */
new_tvb = tvb_new_child_real_data(tvb, buff, data_len, data_len);
- tvb_set_free_cb(new_tvb, g_free);
add_new_data_source(pinfo, new_tvb, "Decoded LAPD bitstream");
data_len = 0;
state = FLAGS;