summaryrefslogtreecommitdiff
path: root/epan/dissectors/packet-rlc-lte.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2016-07-19 22:53:28 -0400
committerEvan Huus <eapache@gmail.com>2016-07-20 22:12:56 +0000
commitbe1398c17ca1d5b203a930d9254125d602830aef (patch)
tree611a6c211931f45a32d65199fa65c4a5a36fec2f /epan/dissectors/packet-rlc-lte.c
parente07b4aa6670f57be7f613eec9d8d47712d1cfa86 (diff)
downloadwireshark-be1398c17ca1d5b203a930d9254125d602830aef.tar.gz
Convert uses of g_alloced data with tvb_new_child_real_data to use pinfo->pool instead.
Aldo update documentation to suggest using wmem pinfo->pool instead of glib memory Change-Id: I5d34cc6c1515aa9f0d57784b38da501ffcb95ccc Reviewed-on: https://code.wireshark.org/review/16551 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: Evan Huus <eapache@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-rlc-lte.c')
-rw-r--r--epan/dissectors/packet-rlc-lte.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/epan/dissectors/packet-rlc-lte.c b/epan/dissectors/packet-rlc-lte.c
index aab7cfe832..296a081c67 100644
--- a/epan/dissectors/packet-rlc-lte.c
+++ b/epan/dissectors/packet-rlc-lte.c
@@ -524,7 +524,7 @@ static tvbuff_t* reassembly_get_reassembled_tvb(rlc_channel_reassembly_info *rea
for (n=0; n < reassembly_info->number_of_segments; n++) {
combined_length += reassembly_info->segments[n].length;
}
- combined_data = (guint8 *)g_malloc(combined_length);
+ combined_data = (guint8 *)wmem_alloc(pinfo->pool, combined_length);
/* Copy data into contiguous buffer */
for (n=0; n < reassembly_info->number_of_segments; n++) {
@@ -536,7 +536,6 @@ static tvbuff_t* reassembly_get_reassembled_tvb(rlc_channel_reassembly_info *rea
/* Create and return tvb with this data */
reassembled_tvb = tvb_new_child_real_data(parent_tvb, combined_data, combined_offset, combined_offset);
- tvb_set_free_cb(reassembled_tvb, g_free);
add_new_data_source(pinfo, reassembled_tvb, "Reassembled SDU");
return reassembled_tvb;
}