diff options
author | codemaster <codemaster@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2004-11-22 21:14:43 +0000 |
---|---|---|
committer | codemaster <codemaster@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2004-11-22 21:14:43 +0000 |
commit | 145e0cc5661bb3a65b47d6d2384b134c5bafca95 (patch) | |
tree | e7693e4d7310ab0318d6930f6cd77011ca2c464d | |
parent | 0cf6ef993822af6042122a25a8d7762742f18b54 (diff) | |
download | hercules-145e0cc5661bb3a65b47d6d2384b134c5bafca95.tar.gz hercules-145e0cc5661bb3a65b47d6d2384b134c5bafca95.tar.bz2 hercules-145e0cc5661bb3a65b47d6d2384b134c5bafca95.tar.xz hercules-145e0cc5661bb3a65b47d6d2384b134c5bafca95.zip |
Added free()'s
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/athena@327 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r-- | src/char_sql/char.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/char_sql/char.c b/src/char_sql/char.c index ef6c0d562..2d54d21ce 100644 --- a/src/char_sql/char.c +++ b/src/char_sql/char.c @@ -2505,9 +2505,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; } @@ -2683,10 +2683,9 @@ void do_final(void) { printf("DB server Error (insert `char`)- %s\n", mysql_error(&mysql_handle)); } - if (gm_account != NULL) - free(gm_account); + if(gm_account) free(gm_account); - free(char_dat); + if(char_dat) free(char_dat); delete_session(login_fd); delete_session(char_fd); |