summaryrefslogtreecommitdiff
path: root/src/map/pet.c
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-02-27 20:18:13 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-02-27 20:18:13 +0000
commitd037edba1e53cc78a2a79bc4dc1fae6d013e589d (patch)
treed919fb61516ebc8d578ccc0e4746ec63b4e5d759 /src/map/pet.c
parent4f1fa6eb8e89f9059f7468526c8f990e2ccbc251 (diff)
downloadhercules-d037edba1e53cc78a2a79bc4dc1fae6d013e589d.tar.gz
hercules-d037edba1e53cc78a2a79bc4dc1fae6d013e589d.tar.bz2
hercules-d037edba1e53cc78a2a79bc4dc1fae6d013e589d.tar.xz
hercules-d037edba1e53cc78a2a79bc4dc1fae6d013e589d.zip
Fixed @reloadmobdb producing memory leaks in pet db (bugreport:1030)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12250 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pet.c')
-rw-r--r--src/map/pet.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/map/pet.c b/src/map/pet.c
index f413863a0..f8ee3e216 100644
--- a/src/map/pet.c
+++ b/src/map/pet.c
@@ -1237,7 +1237,7 @@ int read_petdb()
// Remove any previous scripts in case reloaddb was invoked.
for( j = 0; j < MAX_PET_DB; j++ )
if (pet_db[j].script) {
- aFree(pet_db[j].script);
+ script_free_code(pet_db[j].script);
pet_db[j].script = NULL;
}
@@ -1332,7 +1332,6 @@ int read_petdb()
*------------------------------------------*/
int do_init_pet(void)
{
- memset(pet_db,0,sizeof(pet_db));
read_petdb();
item_drop_ers = ers_new(sizeof(struct item_drop));