summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2014-02-21 12:56:59 -0300
committershennetsind <ind@henn.et>2014-02-21 12:56:59 -0300
commit5421a7e4e6368a5e6e1438043f8e9b9dd5533fc9 (patch)
treebe374d9a5f66d4f2e93cdb687859a8ef178e96be /src/map
parent3e85baef7618f254e660c991b079f3b8b2a48d9c (diff)
downloadhercules-5421a7e4e6368a5e6e1438043f8e9b9dd5533fc9.tar.gz
hercules-5421a7e4e6368a5e6e1438043f8e9b9dd5533fc9.tar.bz2
hercules-5421a7e4e6368a5e6e1438043f8e9b9dd5533fc9.tar.xz
hercules-5421a7e4e6368a5e6e1438043f8e9b9dd5533fc9.zip
Follow up a7d421274b308f7d9cc4ac39935beae851b29b97
Ensured same vars are also cleared upon shutdown. Signed-off-by: shennetsind <ind@henn.et>
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;