summaryrefslogtreecommitdiff
path: root/src/map/map.c
diff options
context:
space:
mode:
authorcodemaster <codemaster@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-01-02 09:10:48 +0000
committercodemaster <codemaster@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-01-02 09:10:48 +0000
commit9a4314e14fef7680cda7ae187a2594cf5495d11e (patch)
tree39e932ba3c3e0973e0f0a218e3f16435b8d92448 /src/map/map.c
parent6f60ed249edbd1821b1458b30678ebcd3cef96f7 (diff)
downloadhercules-9a4314e14fef7680cda7ae187a2594cf5495d11e.tar.gz
hercules-9a4314e14fef7680cda7ae187a2594cf5495d11e.tar.bz2
hercules-9a4314e14fef7680cda7ae187a2594cf5495d11e.tar.xz
hercules-9a4314e14fef7680cda7ae187a2594cf5495d11e.zip
* More atempts at memory leak fixes [Codemaster] [SVN 890]
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@890 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/map.c')
-rw-r--r--src/map/map.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/map/map.c b/src/map/map.c
index 99d38d1ae..ae99c477b 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -2540,13 +2540,22 @@ int id_db_final(void *k,void *d,va_list ap)
nullpo_retr(0, id=d);
if(id->lootitem)
free(id->lootitem);
- free(id);
+ if(id)
+ free(id);
+ return 0;
+}
+int map_db_final(void *k,void *d,va_list ap)
+{
+ struct map_data *id;
+ nullpo_retr(0, id=d);
+ if(id->gat)
+ free(id->gat);
+ if(id)
+ free(id);
return 0;
}
-int map_db_final(void *k,void *d,va_list ap){ return 0; }
int nick_db_final(void *k,void *d,va_list ap){ return 0; }
int charid_db_final(void *k,void *d,va_list ap){ return 0; }
-
static int cleanup_sub(struct block_list *bl, va_list ap) {
nullpo_retr(0, bl);