diff options
author | codemaster <codemaster@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2004-11-22 21:15:00 +0000 |
---|---|---|
committer | codemaster <codemaster@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2004-11-22 21:15:00 +0000 |
commit | d163695de043c965732280327ea74c39ab961944 (patch) | |
tree | 4ffaa6089b961b33e1022bc1b024ae037f7bdea2 /src | |
parent | 35d04360dc108cf2faa184030645c6875a0009e5 (diff) | |
download | hercules-d163695de043c965732280327ea74c39ab961944.tar.gz hercules-d163695de043c965732280327ea74c39ab961944.tar.bz2 hercules-d163695de043c965732280327ea74c39ab961944.tar.xz hercules-d163695de043c965732280327ea74c39ab961944.zip |
Added free()'s
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/athena@329 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r-- | src/login_sql/login.c | 6 | ||||
-rw-r--r-- | src/login_sql/strlib.c | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/login_sql/login.c b/src/login_sql/login.c index f61f650cc..338ac92b4 100644 --- a/src/login_sql/login.c +++ b/src/login_sql/login.c @@ -1406,9 +1406,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; } diff --git a/src/login_sql/strlib.c b/src/login_sql/strlib.c index 7f6e19785..fd8c90ef0 100644 --- a/src/login_sql/strlib.c +++ b/src/login_sql/strlib.c @@ -31,7 +31,7 @@ unsigned char* jstrescape (unsigned char* pt) { } } pt[j++] = '\0'; - free (ptr); + if(ptr) free(ptr); return (unsigned char*) &pt[0]; } |