Explorar el Código

- Fixed a memory leak when reading the item_db txt.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7906 54d463be-8e91-2dee-dedb-b68131a5f0ec
skotlex hace 19 años
padre
commit
6c9eb52332
Se han modificado 2 ficheros con 3 adiciones y 2 borrados
  1. 1 0
      Changelog-Trunk.txt
  2. 2 2
      src/map/itemdb.c

+ 1 - 0
Changelog-Trunk.txt

@@ -4,6 +4,7 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK.  ALL UNTESTED BUGFIXES/FEATURES GO
 IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
 
 2006/07/26
+	* Fixed a memory leak when reading the item_db txt. [Skotlex]
 	* Applied the necessary changes to make @partyoption reflect it's changes
 	  on the alt+p window. [Skotlex]
 	* Modified party_item_share_type config setting so that using 1 disables

+ 2 - 2
src/map/itemdb.c

@@ -1130,11 +1130,11 @@ static int itemdb_readdb(void)
 				id->script=NULL;
 			}
 			if (id->equip_script) {
-				aFree(id->equip_script);
+				script_free_code(id->equip_script);
 				id->equip_script=NULL;
 			}
 			if (id->unequip_script) {
-				aFree(id->unequip_script);
+				script_free_code(id->unequip_script);
 				id->unequip_script=NULL;
 			}