summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcodemaster <codemaster@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-01-01 02:13:59 +0000
committercodemaster <codemaster@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-01-01 02:13:59 +0000
commitc6a5dcb600cf207feebea9f084bd7f1f44367de3 (patch)
tree86abe4295481bb2ca125305f9bf74fe24bf1cd55
parentd80c8a047666856947981a91a4fbf401d87ec732 (diff)
downloadhercules-c6a5dcb600cf207feebea9f084bd7f1f44367de3.tar.gz
hercules-c6a5dcb600cf207feebea9f084bd7f1f44367de3.tar.bz2
hercules-c6a5dcb600cf207feebea9f084bd7f1f44367de3.tar.xz
hercules-c6a5dcb600cf207feebea9f084bd7f1f44367de3.zip
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@886 54d463be-8e91-2dee-dedb-b68131a5f0ec
-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; }