summaryrefslogtreecommitdiff
path: root/src/map/map.c
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-04-11 19:24:59 -0300
committershennetsind <ind@henn.et>2013-04-11 19:24:59 -0300
commit1152ef720d3ef010a40ddf3cb5fc63fbc2f3e030 (patch)
tree3deca39ef5a3b9a3be62ac8e5906c64cb7e44926 /src/map/map.c
parent81bc395cc19fe06ea1cd49db22dc8c202c684d9f (diff)
downloadhercules-1152ef720d3ef010a40ddf3cb5fc63fbc2f3e030.tar.gz
hercules-1152ef720d3ef010a40ddf3cb5fc63fbc2f3e030.tar.bz2
hercules-1152ef720d3ef010a40ddf3cb5fc63fbc2f3e030.tar.xz
hercules-1152ef720d3ef010a40ddf3cb5fc63fbc2f3e030.zip
Fixed Bug #7158
http://hercules.ws/board/tracker/issue-7158-memory-leak/ Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/map.c')
-rw-r--r--src/map/map.c24
1 files changed, 1 insertions, 23 deletions
diff --git a/src/map/map.c b/src/map/map.c
index 03ed08f8b..cdbe591f5 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -1699,33 +1699,11 @@ int map_quit(struct map_session_data *sd) {
unit_remove_map(&sd->ed->bl,CLR_TELEPORT);
}
- if( hChSys.ally && sd->status.guild_id ) {
- struct guild *g = sd->guild, *sg;
- if( g ) {
- if( idb_exists(((struct hChSysCh *)g->channel)->users, sd->status.char_id) )
- clif->chsys_left((struct hChSysCh *)g->channel,sd);
- for (i = 0; i < MAX_GUILDALLIANCE; i++) {
- if( g->alliance[i].guild_id && (sg = guild_search(g->alliance[i].guild_id) ) ) {
- if( idb_exists(((struct hChSysCh *)sg->channel)->users, sd->status.char_id) )
- clif->chsys_left((struct hChSysCh *)sg->channel,sd);
- break;
- }
- }
- }
- }
-
if( hChSys.local && map[sd->bl.m].channel && idb_exists(map[sd->bl.m].channel->users, sd->status.char_id) ) {
clif->chsys_left(map[sd->bl.m].channel,sd);
}
- if( sd->channel_count ) {
- for( i = 0; i < sd->channel_count; i++ ) {
- if( sd->channels[i] != NULL )
- clif->chsys_left(sd->channels[i],sd);
- }
- if( hChSys.closing )
- aFree(sd->channels);
- }
+ clif->chsys_quit(sd);
unit_remove_map_pc(sd,CLR_TELEPORT);