}
}
+static void
+free_param_list (struct tc_tracecut *tc)
+{
+ struct tc_param *param = tc->param_list;
+ tc->param_list = NULL;
+
+ while (param != NULL)
+ {
+ struct tc_param *next = param->next;
+
+ free ((char *)param->name);
+ param->next = NULL;
+ free (param);
+
+ param = next;
+ }
+}
+
+static void
+free_binding_list (struct tc_call_symbol *symbol)
+{
+ struct tc_call_binding *binding = symbol->binding_list;
+ symbol->binding_list = NULL;
+
+ while (binding != NULL)
+ {
+ struct tc_call_binding *next = binding->next;
+ free (binding);
+
+ binding = next;
+ }
+}
+
+static void
+free_symbol_list (struct tc_tracecut *tc)
+{
+ struct tc_call_symbol *symbol = tc->symbol_list;
+ tc->symbol_list = NULL;
+
+ while (symbol != NULL)
+ {
+ struct tc_call_symbol *next = symbol->next;
+
+ free ((char *)symbol->name);
+ free ((char *)symbol->func_name);
+ free_binding_list (symbol);
+ symbol->next = NULL;
+ free (symbol);
+
+ symbol = next;
+ }
+}
+
+static void
+free_rule_list (struct tc_tracecut *tc)
+{
+ struct tc_rule *rule;
+ tc->rule_list = NULL;
+
+ while (rule != NULL)
+ {
+ struct tc_rule *next = rule->next;
+
+ free ((char *)rule->specification);
+ rule->next = NULL;
+ free (rule);
+
+ rule = next;
+ }
+}
+
/**
* Free all the memory used by a tc_tracecut object. Every call to
* tc_create_tracecut() should have a matching call to
{
remove_tracecut_from_list (tc);
+ free_param_list (tc);
+ free_symbol_list (tc);
+ free_rule_list (tc);
+
free(tc);
}