Issue information

Issue ID
#1731
Status
Unable to Fix
Severity
None
Started
Hercules Elf Bot
Jun 21, 2008 14:30
Last Post
Hercules Elf Bot
Jun 21, 2008 14:30
Confirmation
N/A

Hercules Elf Bot - Jun 21, 2008 14:30

Originally posted by [b]Velly[/b]
http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=1731

[font="Arial"][/font][size="1"][/size]Inside log folder "map-server.leaks" contents...

----------------------------------------------------------------------------------------------------------------
Memory manager: Memory leaks found at 2008/06/21 20h26m44s (Revision

Unknown).
0001 : d:\new_eathena\src\map\chat.c line 29 size 212 address 0x0A236944
0002 : d:\new_eathena\src\map\chat.c line 29 size 212 address 0x0A237664
0003 : d:\new_eathena\src\map\chat.c line 29 size 212 address 0x0A237DE4
0004 : d:\new_eathena\src\map\chat.c line 29 size 212 address 0x0A238384
0005 : d:\new_eathena\src\map\chat.c line 29 size 212 address 0x0A238474
0006 : d:\new_eathena\src\map\chat.c line 29 size 212 address 0x0A238564
0007 : d:\new_eathena\src\map\chat.c line 29 size 212 address 0x0A238654
0008 : d:\new_eathena\src\map\chat.c line 29 size 212 address 0x0A238744
0009 : d:\new_eathena\src\map\chat.c line 29 size 212 address 0x0A238834
0010 : d:\new_eathena\src\map\chat.c line 29 size 212 address 0x0A238924
0011 : d:\new_eathena\src\map\chat.c line 29 size 212 address 0x0A238A14
0012 : d:\new_eathena\src\map\chat.c line 29 size 212 address 0x0A238B04
0013 : d:\new_eathena\src\map\chat.c line 29 size 212 address 0x0A238BF4
0014 : d:\new_eathena\src\map\chat.c line 29 size 212 address 0x0A238CE4
0015 : d:\new_eathena\src\map\chat.c line 29 size 212 address 0x0A238DD4
0016 : d:\new_eathena\src\map\chat.c line 29 size 212 address 0x0A238EC4
0017 : d:\new_eathena\src\map\chat.c line 29 size 212 address 0x0A238FB4
0018 : d:\new_eathena\src\map\chat.c line 29 size 212 address 0x0A2390A4
0019 : d:\new_eathena\src\map\chat.c line 29 size 212 address 0x0A239194
0020 : d:\new_eathena\src\map\chat.c line 29 size 212 address 0x0A239284
0021 : d:\new_eathena\src\map\chat.c line 29 size 212 address 0x0A239374
0022 : d:\new_eathena\src\map\chat.c line 29 size 212 address 0x0A239464
0023 : d:\new_eathena\src\map\chat.c line 29 size 212 address 0x0A239554
0024 : d:\new_eathena\src\map\chat.c line 29 size 212 address 0x0A239644
0025 : d:\new_eathena\src\map\chat.c line 29 size 212 address 0x0A239734
0026 : d:\new_eathena\src\map\chat.c line 29 size 212 address 0x0A239824
0027 : d:\new_eathena\src\map\chat.c line 29 size 212 address 0x0A239914
0028 : d:\new_eathena\src\map\chat.c line 29 size 212 address 0x0A239A04
0029 : d:\new_eathena\src\map\chat.c line 29 size 212 address 0x0A239AF4
0030 : d:\new_eathena\src\map\chat.c line 29 size 212 address 0x0A239BE4
0031 : d:\new_eathena\src\map\chat.c line 29 size 212 address 0x0A239CD4
0032 : d:\new_eathena\src\map\chat.c line 29 size 212 address 0x0A239DC4
0033 : d:\new_eathena\src\map\chat.c line 29 size 212 address 0x0A239EB4
0034 : d:\new_eathena\src\map\chat.c line 29 size 212 address 0x0A239FA4
0035 : d:\new_eathena\src\map\chat.c line 29 size 212 address 0x0A23A094
0036 : d:\new_eathena\src\map\chat.c line 29 size 212 address 0x0A23A184
0037 : d:\new_eathena\src\map\chat.c line 29 size 212 address 0x0A23A274
0038 : d:\new_eathena\src\map\chat.c line 29 size 212 address 0x0A23A364
0039 : d:\new_eathena\src\map\chat.c line 29 size 212 address 0x0A23A454
0040 : d:\new_eathena\src\map\chat.c line 29 size 212 address 0x0A23A544
0041 : d:\new_eathena\src\map\chat.c line 29 size 212 address 0x0A23A634
0042 : d:\new_eathena\src\map\chat.c line 29 size 212 address 0x0A23A724
0043 : d:\new_eathena\src\map\chat.c line 29 size 212 address 0x0A23A814
0044 : d:\new_eathena\src\map\chat.c line 29 size 212 address 0x0A23A904
0045 : d:\new_eathena\src\map\chat.c line 29 size 212 address 0x0A23A9F4
0046 : d:\new_eathena\src\map\chat.c line 29 size 212 address 0x0A23AAE4
0047 : d:\new_eathena\src\map\chat.c line 29 size 212 address 0x0A23ABD4
0048 : d:\new_eathena\src\map\chat.c line 29 size 212 address 0x0A23ACC4
0049 : d:\new_eathena\src\map\chat.c line 29 size 212 address 0x0A23ADB4
0050 : d:\new_eathena\src\map\chat.c line 29 size 212 address 0x0A23AEA4
0051 : d:\new_eathena\src\map\chat.c line 29 size 212 address 0x0A23AF94
0052 : d:\new_eathena\src\map\chat.c line 29 size 212 address 0x0A23B084
0053 : d:\new_eathena\src\map\chat.c line 29 size 212 address 0x0A23B174
0054 : d:\new_eathena\src\map\chat.c line 29 size 212 address 0x0A23B264
0055 : d:\new_eathena\src\map\chat.c line 29 size 212 address 0x0A23B354
0056 : d:\new_eathena\src\map\chat.c line 29 size 212 address 0x0A23B444
0057 : d:\new_eathena\src\map\chat.c line 29 size 212 address 0x0A23B534
0058 : d:\new_eathena\src\map\chat.c line 29 size 212 address 0x0A23B624
0059 : d:\new_eathena\src\map\chat.c line 29 size 212 address 0x0A23B714
0060 : d:\new_eathena\src\map\chat.c line 29 size 212 address 0x0A23B804
0061 : d:\new_eathena\src\map\chat.c line 29 size 212 address 0x0A23B8F4
0062 : d:\new_eathena\src\map\chat.c line 29 size 212 address 0x0A23B9E4
0063 : d:\new_eathena\src\map\chat.c line 29 size 212 address 0x0A23BAD4
0064 : d:\new_eathena\src\map\chat.c line 29 size 212 address 0x0A23BBC4
0065 : d:\new_eathena\src\map\chat.c line 29 size 212 address 0x0A23BCB4
0066 : d:\new_eathena\src\map\chat.c line 29 size 212 address 0x0A23BDA4
0067 : d:\new_eathena\src\map\chat.c line 29 size 212 address 0x0A23BE94
0068 : d:\new_eathena\src\map\chat.c line 29 size 212 address 0x0A23C074
0069 : d:\new_eathena\src\map\chat.c line 29 size 212 address 0x0A23C164
0070 : d:\new_eathena\src\map\chat.c line 29 size 212 address 0x0A23C254
0071 : d:\new_eathena\src\map\chat.c line 29 size 212 address 0x0A23C344
0072 : d:\new_eathena\src\map\chat.c line 29 size 212 address 0x0A23C434
0073 : d:\new_eathena\src\map\chat.c line 29 size 212 address 0x0A23C524
0074 : d:\new_eathena\src\map\chat.c line 29 size 212 address 0x0A23C614
0075 : d:\new_eathena\src\map\chat.c line 29 size 212 address 0x0A23C704
0076 : d:\new_eathena\src\map\guild.c line 1685 size 56 address 0x0B7C71C4
0077 : d:\new_eathena\src\map\guild.c line 1685 size 56 address 0x0B7C8484
0078 : d:\new_eathena\src\map\guild.c line 1685 size 56 address 0x0B7C85C4
0079 : d:\new_eathena\src\map\guild.c line 1685 size 56 address 0x0B7C8A24
0080 : d:\new_eathena\src\map\guild.c line 1685 size 56 address 0x0B7C8FC4
0081 : d:\new_eathena\src\map\guild.c line 1685 size 56 address 0x0B7CAFA4
0082 : d:\new_eathena\src\map\guild.c line 1685 size 56 address 0x0B7CBDB4
0083 : d:\new_eathena\src\map\guild.c line 1685 size 56 address 0x0B7CDF74
0084 : d:\new_eathena\src\map\guild.c line 1685 size 56 address 0x0B7CE064
0085 : d:\new_eathena\src\map\guild.c line 1685 size 56 address 0x0B7CE334
------------------------------------------------------------------------------------------------




chat.c 29 line contents
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
static struct chat_data* chat_createchat(struct block_list* bl, const char* title, const char* pass, int limit, bool pub, int trigger, const char* ev)
{
struct chat_data* cd;
nullpo_retr(NULL, bl);

cd = (struct chat_data *) aMalloc(sizeof(struct chat_data)); <--- This place reduces 29th

safestrncpy(cd->title, title, sizeof(cd->title));
safestrncpy(cd->pass, pass, sizeof(cd->pass));
cd->pub = pub;
cd->users = 0;
cd->limit = min(limit, ARRAYLENGTH(cd->usersd));
cd->trigger = trigger;
memset(cd->usersd, 0, sizeof(cd->usersd));
cd->owner = bl;
safestrncpy(cd->npc_event, ev, sizeof(cd->npc_event));

cd->bl.m = bl->m;
cd->bl.x = bl->x;
cd->bl.y = bl->y;
cd->bl.type = BL_CHAT;
cd->bl.next = cd->bl.prev = NULL;
cd->bl.id = map_addobject(&cd->bl);

if( cd->bl.id == 0 )
{
aFree(cd);
cd = NULL;
}

return cd;
}
----------------------------------------------------------------------------------------------------------------------------------------


guild.c
----------------------------------------------------------------------------------------------------------------------------------------
int guild_addcastleinfoevent(int castle_id,int index,const char *name)
{
struct eventlist *ev;
int code=castle_id|(index<<16);

if( name==NULL || *name==0 )
return 0;

ev=(struct eventlist *)aMalloc(sizeof(struct eventlist)); <--- This place reduces 1685th

memcpy(ev->name,name,sizeof(ev->name));
//The next event becomes whatever was currently stored.
ev->next= idb_put(guild_castleinfoevent_db,code,ev);
return 0;
}

----------------------------------------------------------------------------------------------------------------------------------------


What is problem? Entrusts.