summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog.txt1
-rw-r--r--src/map/map.c10
2 files changed, 10 insertions, 1 deletions
diff --git a/Changelog.txt b/Changelog.txt
index d13e44465..493f64a6f 100644
--- a/Changelog.txt
+++ b/Changelog.txt
@@ -1,5 +1,6 @@
Date Added
01/01
+ * Attempted to fix a memory leak [Codemaster] - tell me if it works XD (NPC/Mob memory leak in npc_parse_mob(...))
* Added a char config that allows GMs that have a certain level or above to
bypass the server's user limit [Codemaster]
* Changed some create arrow outputs for new kRO 12/21/04 patch [Aria]
diff --git a/src/map/map.c b/src/map/map.c
index d6f6d72fa..99d38d1ae 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -2534,7 +2534,15 @@ int flush_timer(int tid, unsigned int tick, int id, int data){
return 0;
}
-int id_db_final(void *k,void *d,va_list ap){ return 0; }
+int id_db_final(void *k,void *d,va_list ap)
+{
+ struct mob_data *id;
+ nullpo_retr(0, id=d);
+ if(id->lootitem)
+ free(id->lootitem);
+ 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; }