summaryrefslogtreecommitdiff
path: root/src/map/map.c
diff options
context:
space:
mode:
author(no author) <(no author)@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-01-26 16:44:38 +0000
committer(no author) <(no author)@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-01-26 16:44:38 +0000
commit908d434f0471537364dcc19376993400937f23c9 (patch)
treeccd1dd3fc0ebcd1b835ff3ceb30221c19ba7cdf2 /src/map/map.c
parent7923c32b8ebfbebd09dc0d783e93fef51a4ec38b (diff)
downloadhercules-908d434f0471537364dcc19376993400937f23c9.tar.gz
hercules-908d434f0471537364dcc19376993400937f23c9.tar.bz2
hercules-908d434f0471537364dcc19376993400937f23c9.tar.xz
hercules-908d434f0471537364dcc19376993400937f23c9.zip
Fixed memory leak
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@999 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/map.c')
-rw-r--r--src/map/map.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/map/map.c b/src/map/map.c
index 8dd538015..e942ead50 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -1085,7 +1085,13 @@ int map_quit(struct map_session_data *sd) {
chrif_char_offline(sd);
#endif
- numdb_erase(id_db,sd->bl.id);
+ {
+ void *p = numdb_search(charid_db,sd->status.char_id);
+ if(p) {
+ numdb_erase(charid_db,sd->status.char_id);
+ free(p);
+ }
+ }
strdb_erase(nick_db,sd->status.name);
numdb_erase(charid_db,sd->status.char_id);