diff options
-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]; } |