diff options
author | Michael Mann <mmann78@netscape.net> | 2016-12-22 15:12:27 -0500 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2017-01-07 00:44:10 +0000 |
commit | 6a6d7ea34f43515dfe3f52aa96b943c272c925a7 (patch) | |
tree | dbf89a2226861fa855cc04d80607c56f7268e51b /plugins/stats_tree/pinfo_stats_tree.c | |
parent | 29a7fce2720288c86e474f68880a0e61e517027b (diff) |
Convert range API to always use wmem memory.
This is mostly to address memory leaks in range preferences (the biggest
user of range functionality) on shutdown.
Now range preferences must use epan scoped memory when referencing
internal preference structures to keep consistency.
Change-Id: Idc644f59b5b42fa1d46891542b53ff13ea754157
Reviewed-on: https://code.wireshark.org/review/19387
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'plugins/stats_tree/pinfo_stats_tree.c')
-rw-r--r-- | plugins/stats_tree/pinfo_stats_tree.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/stats_tree/pinfo_stats_tree.c b/plugins/stats_tree/pinfo_stats_tree.c index c1ce818083..b8eb54b7c1 100644 --- a/plugins/stats_tree/pinfo_stats_tree.c +++ b/plugins/stats_tree/pinfo_stats_tree.c @@ -60,7 +60,7 @@ static void *uat_plen_record_copy_cb(void *n, const void *o, size_t siz _U_) { uat_plen_record_t *rn = (uat_plen_record_t *)n; if (r->packet_range) - rn->packet_range = range_copy(r->packet_range); + rn->packet_range = range_copy(NULL, r->packet_range); return n; } @@ -82,7 +82,7 @@ static void uat_plen_record_free_cb(void*r) { uat_plen_record_t *record = (uat_plen_record_t*)r; if (record->packet_range) - g_free(record->packet_range); + wmem_free(NULL, record->packet_range); } static void uat_plen_record_post_update_cb(void) { |