summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
Diffstat (limited to 'src/map')
-rw-r--r--src/map/chrif.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/map/chrif.c b/src/map/chrif.c
index a09284830..301c8ec66 100644
--- a/src/map/chrif.c
+++ b/src/map/chrif.c
@@ -1617,9 +1617,16 @@ void chrif_del_scdata_single(int account_id, int char_id, short type) {
int auth_db_final(DBKey key, DBData *data, va_list ap) {
struct auth_node *node = DB->data2ptr(data);
- if (node->sd)
+ if (node->sd) {
+
+ if( node->sd->var_db )
+ node->sd->var_db->destroy(node->sd->var_db,script->reg_destroy);
+
+ if( node->sd->array_db )
+ node->sd->array_db->destroy(node->sd->array_db,script->array_free_db);
+
aFree(node->sd);
-
+ }
ers_free(chrif->auth_db_ers, node);
return 0;