summaryrefslogtreecommitdiff
path: root/src/char/inter.c
diff options
context:
space:
mode:
authorcelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-03-23 15:26:52 +0000
committercelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-03-23 15:26:52 +0000
commit33b8fd47955eeab26cede233b14d683b8e0491b8 (patch)
tree041f7df2acc8b46bdb56512f06b0f9706fe6ec29 /src/char/inter.c
parent7d3fedfa5c264169c544fe3ec977229c50e4baa2 (diff)
downloadhercules-33b8fd47955eeab26cede233b14d683b8e0491b8.tar.gz
hercules-33b8fd47955eeab26cede233b14d683b8e0491b8.tar.bz2
hercules-33b8fd47955eeab26cede233b14d683b8e0491b8.tar.xz
hercules-33b8fd47955eeab26cede233b14d683b8e0491b8.zip
* Fixed alot of memory leaks
* Added stray memory cleaning routine to db.c git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@1275 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/char/inter.c')
-rw-r--r--src/char/inter.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/char/inter.c b/src/char/inter.c
index f368a48b6..3a388ea82 100644
--- a/src/char/inter.c
+++ b/src/char/inter.c
@@ -261,6 +261,29 @@ int inter_init(const char *file) {
return 0;
}
+// finalize
+int accreg_db_final (void *k, void *data, va_list ap) {
+ struct accreg *p = data;
+ if (p) aFree(p);
+ return 0;
+}
+int wis_db_final (void *k, void *data, va_list ap) {
+ struct WisData *p = data;
+ if (p) aFree(p);
+ return 0;
+}
+void inter_final() {
+ numdb_final(accreg_db, accreg_db_final);
+ numdb_final(wis_db, wis_db_final);
+
+ inter_party_final();
+ inter_guild_final();
+ inter_storage_final();
+ inter_pet_final();
+
+ return;
+}
+
// マップサーバー接続
int inter_mapif_init(int fd) {
inter_guild_mapif_init(fd);