summaryrefslogtreecommitdiff
path: root/src/map/storage.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/storage.c')
-rw-r--r--src/map/storage.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/map/storage.c b/src/map/storage.c
index 3944f1ac1..f0e22c71d 100644
--- a/src/map/storage.c
+++ b/src/map/storage.c
@@ -62,9 +62,24 @@ int do_init_storage(void) // map.c::do_init()から呼ばれる
guild_storage_db=numdb_init();
return 1;
}
-
-void do_final_storage(void) // map.c::do_final()から呼ばれる
+static int guild_storage_db_final(void *key,void *data,va_list ap)
+{
+ struct guild_storage *gstor=data;
+ free(gstor);
+ return 0;
+}
+static int storage_db_final(void *key,void *data,va_list ap)
+{
+ struct storage *stor=data;
+ free(stor);
+ return 0;
+}
+void do_final_storage(void) // by [MC Cameri]
{
+ if (storage_db)
+ numdb_final(storage_db,storage_db_final);
+ if (guild_storage_db)
+ numdb_final(guild_storage_db,guild_storage_db_final);
}
struct storage *account2storage(int account_id)