git-svn-id: https://svn.code.sf.net/p/rathena/svn/athena@329 54d463be-8e91-2dee-dedb-b68131a5f0ec
@@ -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;
}
@@ -31,7 +31,7 @@ unsigned char* jstrescape (unsigned char* pt) {
pt[j++] = '\0';
- free (ptr);
+ if(ptr) free(ptr);
return (unsigned char*) &pt[0];