summaryrefslogtreecommitdiff
path: root/epan
diff options
context:
space:
mode:
authorDario Lombardo <lomato@gmail.com>2017-02-01 14:40:56 +0100
committerDario Lombardo <lomato@gmail.com>2017-02-02 16:47:11 +0000
commit179e0fbc11fda7a2643097d4c67685953fdf5e2f (patch)
treea2012950cb239857e11bd670fb28fc74a56ac288 /epan
parent47ad059bd78ecf94542293e8eb97aedcf5f808f8 (diff)
downloadwireshark-179e0fbc11fda7a2643097d4c67685953fdf5e2f.tar.gz
imf: convert GHashTable to wmem_map
Change-Id: Ia5bd6af88db76bbe4e0a267c30b6f7749b23e299 Reviewed-on: https://code.wireshark.org/review/19903 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Dario Lombardo <lomato@gmail.com>
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-imf.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/epan/dissectors/packet-imf.c b/epan/dissectors/packet-imf.c
index 54e7c8e4c6..91b6935b6e 100644
--- a/epan/dissectors/packet-imf.c
+++ b/epan/dissectors/packet-imf.c
@@ -282,7 +282,7 @@ static struct imf_field imf_fields[] = {
{NULL, NULL, NULL, FALSE},
};
-static GHashTable *imf_field_table=NULL;
+static wmem_map_t *imf_field_table=NULL;
#define FORMAT_UNSTRUCTURED 0
#define FORMAT_MAILBOX 1
@@ -773,7 +773,7 @@ dissect_imf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
ascii_strdown_inplace (key);
/* look up the key in built-in fields */
- f_info = (struct imf_field *)g_hash_table_lookup(imf_field_table, key);
+ f_info = (struct imf_field *)wmem_map_lookup(imf_field_table, key);
if(f_info == NULL && custom_field_table) {
/* look up the key in custom fields */
@@ -1335,11 +1335,11 @@ proto_register_imf(void)
"setup and used for filtering/data extraction etc.",
headers_uat);
- imf_field_table=g_hash_table_new(g_str_hash, g_str_equal); /* oid to syntax */
+ imf_field_table=wmem_map_new(wmem_epan_scope(), wmem_str_hash, g_str_equal); /* oid to syntax */
/* register the fields for lookup */
for(f = imf_fields; f->name; f++)
- g_hash_table_insert(imf_field_table, (gpointer)f->name, (gpointer)f);
+ wmem_map_insert(imf_field_table, (gpointer)f->name, (gpointer)f);
/* Register for tapping */
imf_eo_tap = register_export_object(proto_imf, imf_eo_packet, NULL);