diff options
author | codemaster <codemaster@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2004-11-22 21:14:38 +0000 |
---|---|---|
committer | codemaster <codemaster@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2004-11-22 21:14:38 +0000 |
commit | 0cf6ef993822af6042122a25a8d7762742f18b54 (patch) | |
tree | 862ddbdcd36b582e59cace428e9fbd042175cec7 /src | |
parent | 0f91bc5b3cd43b4810b4c1d4de1bb22b03224dd4 (diff) | |
download | hercules-0cf6ef993822af6042122a25a8d7762742f18b54.tar.gz hercules-0cf6ef993822af6042122a25a8d7762742f18b54.tar.bz2 hercules-0cf6ef993822af6042122a25a8d7762742f18b54.tar.xz hercules-0cf6ef993822af6042122a25a8d7762742f18b54.zip |
Added free()'s
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/athena@326 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r-- | src/char/char.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/char/char.c b/src/char/char.c index c463e64c4..96a851295 100644 --- a/src/char/char.c +++ b/src/char/char.c @@ -2939,9 +2939,9 @@ int parse_console(char *buf) { printf("Type of command: %s || Command: %s \n",type,command); - free(buf); - free(type); - free(command); + if(buf) free(buf); + if(type) free(type); + if(command) free(command); return 0; } @@ -3322,18 +3322,20 @@ void do_final(void) { online_chars[i].server = -1; } create_online_files(); - free(online_chars); + if(online_chars) free(online_chars); mmo_char_sync(); inter_save(); - if (gm_account != NULL) - free(gm_account); + if(gm_account) free(gm_account); + if(char_dat) free(char_dat); - free(char_dat); delete_session(login_fd); delete_session(char_fd); + for(i = 0; i < fd_max; i++) + if(session[i]->session_data) free(session[i]->session_data); + char_log("----End of char-server (normal end with closing of all files)." RETCODE); } |