diff options
author | shennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-07-12 16:48:49 +0000 |
---|---|---|
committer | shennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-07-12 16:48:49 +0000 |
commit | bf469e529783e3716813b98f6436e94c02d43142 (patch) | |
tree | 5073db525574b22041b26b6016140df5ddb3a476 /src/map/mob.c | |
parent | 812a49d677a9e208fc12d66d315a62a05f79d51b (diff) | |
download | hercules-bf469e529783e3716813b98f6436e94c02d43142.tar.gz hercules-bf469e529783e3716813b98f6436e94c02d43142.tar.bz2 hercules-bf469e529783e3716813b98f6436e94c02d43142.tar.xz hercules-bf469e529783e3716813b98f6436e94c02d43142.zip |
Follow up r16414 fixed memleak with md->lootitem
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16417 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/mob.c')
-rw-r--r-- | src/map/mob.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/map/mob.c b/src/map/mob.c index 0516295cc..12ceae907 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -962,8 +962,10 @@ int mob_spawn (struct mob_data *md) memset(md->dmglog, 0, sizeof(md->dmglog)); md->tdmg = 0; - if (md->lootitem) - memset(&md->lootitem, 0, sizeof(md->lootitem)); + if (md->lootitem) { + aFree(md->lootitem); + md->lootitem = NULL; + } md->lootitem_count = 0; if(md->db->option) |