summaryrefslogtreecommitdiff
path: root/epan/expert.c
diff options
context:
space:
mode:
authorEvan Huus <eapache@gmail.com>2013-07-06 16:11:36 +0000
committerEvan Huus <eapache@gmail.com>2013-07-06 16:11:36 +0000
commit5a744f4afa70c75cc06bbeff5825657876d9c6f2 (patch)
tree48df6da73477c4c4eaa517a1a52a8462afe933a8 /epan/expert.c
parent42ce3fe364ec1442f1be3e839232d7ef717f7356 (diff)
downloadwireshark-5a744f4afa70c75cc06bbeff5825657876d9c6f2.tar.gz
Remove unused data structures from new expert code. Cleans up another ~17KB
of leaks, and I suspect they won't be necessary (we can always add them back using wmem if they do turn out to be needed). svn path=/trunk/; revision=50409
Diffstat (limited to 'epan/expert.c')
-rw-r--r--epan/expert.c30
1 files changed, 1 insertions, 29 deletions
diff --git a/epan/expert.c b/epan/expert.c
index ed7cc687e6..f4399e7939 100644
--- a/epan/expert.c
+++ b/epan/expert.c
@@ -55,9 +55,7 @@ static int hf_expert_severity = -1;
struct expert_module
{
const char* proto_name;
- int proto_id; /* Cache this for registering hfs */
- GList *experts; /* expert_infos for this protocol */
- GList *last_expert; /* pointer to end of list of expert_infos */
+ int proto_id; /* Cache this for registering hfs */
};
/* List which stores protocols and expert_info that have been registered */
@@ -68,11 +66,6 @@ typedef struct _gpa_expertinfo_t {
} gpa_expertinfo_t;
static gpa_expertinfo_t gpa_expertinfo;
-/*
- * List of all modules with expert info.
- */
-static emem_tree_t *expert_modules = NULL;
-
/* Possible values for a checksum evaluation */
const value_string expert_checksum_vals[] = {
{ EXPERT_CHECKSUM_DISABLED, "Disabled" },
@@ -121,10 +114,6 @@ expert_packet_init(void)
highest_severity = 0;
- if (expert_modules == NULL) {
- expert_modules = pe_tree_create(EMEM_TREE_TYPE_RED_BLACK, "expert_modules");
- }
-
proto_malformed = proto_get_id_by_filter_name("malformed");
}
@@ -176,13 +165,6 @@ expert_module_t *expert_register_protocol(int id)
module = wmem_new(wmem_epan_scope(), expert_module_t);
module->proto_id = id;
module->proto_name = proto_get_protocol_short_name(protocol);
- module->experts = NULL;
- module->last_expert = NULL;
-
- /*
- * Insert this module into the appropriate place in the tree.
- */
- pe_tree_insert_string(expert_modules, module->proto_name, module, EMEM_TREE_STRING_NOCASE);
return module;
}
@@ -235,16 +217,6 @@ expert_register_field_array(expert_module_t* module, ei_register_info *exp, cons
return;
}
- if (module != NULL) {
- if (module->experts == NULL) {
- module->experts = g_list_append(NULL, ptr);
- module->last_expert = module->experts;
- } else {
- module->last_expert =
- g_list_append(module->last_expert, ptr)->next;
- }
- }
-
/* Register the field with the experts */
ptr->ids->ei = expert_register_field_init(&ptr->eiinfo, module);