From 1152ef720d3ef010a40ddf3cb5fc63fbc2f3e030 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Thu, 11 Apr 2013 19:24:59 -0300 Subject: Fixed Bug #7158 http://hercules.ws/board/tracker/issue-7158-memory-leak/ Signed-off-by: shennetsind --- src/map/guild.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/map/guild.c') diff --git a/src/map/guild.c b/src/map/guild.c index 9b128c4e1..321560420 100644 --- a/src/map/guild.c +++ b/src/map/guild.c @@ -902,17 +902,13 @@ int guild_member_withdraw(int guild_id, int account_id, int char_id, int flag, c clif->guild_memberlist(online_member_sd); // update char, if online - if(sd != NULL && sd->status.guild_id == guild_id) - { + if(sd != NULL && sd->status.guild_id == guild_id) { // do stuff that needs the guild_id first, BEFORE we wipe it if (sd->state.storage_flag == 2) //Close the guild storage. storage_guild_storageclose(sd); guild_send_dot_remove(sd); if( hChSys.ally ) { - for (i = 0; i < sd->channel_count; i++) { - if( sd->channels[i] && sd->channels[i]->type == hChSys_ALLY ) - clif->chsys_left(sd->channels[i],sd); - } + clif->chsys_quitg(sd); } sd->status.guild_id = 0; sd->guild = NULL; -- cgit v1.2.3-60-g2f50