+void
+free_dle(
+ dle_t *dle)
+{
+ scriptlist_t scriptlist;
+
+ amfree(dle->disk);
+ amfree(dle->device);
+ amfree(dle->program);
+ g_slist_free(dle->estimatelist);
+ g_slist_free_full(dle->levellist);
+ amfree(dle->dumpdate);
+ amfree(dle->compprog);
+ amfree(dle->srv_encrypt);
+ amfree(dle->clnt_encrypt);
+ amfree(dle->srv_decrypt_opt);
+ amfree(dle->clnt_decrypt_opt);
+ amfree(dle->auth);
+ free_sl(dle->exclude_file);
+ free_sl(dle->exclude_list);
+ free_sl(dle->include_file);
+ free_sl(dle->include_list);
+ if (dle->application_property)
+ g_hash_table_destroy(dle->application_property);
+ for(scriptlist = dle->scriptlist; scriptlist != NULL;
+ scriptlist = scriptlist->next) {
+ free_script_data((script_t *)scriptlist->data);
+ }
+ g_slist_free_full(dle->scriptlist);
+ g_slist_free_full(dle->directtcp_list);
+ amfree(dle);
+}
+
+void
+free_script_data(
+ script_t *script)
+{
+ amfree(script->plugin);
+ if (script->property)
+ g_hash_table_destroy(script->property);
+}
+