Added free()'s
git-svn-id: https://svn.code.sf.net/p/rathena/svn/athena@329 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
8aff440ce1
commit
dc78602f40
@ -1406,9 +1406,9 @@ int parse_console(char *buf) {
|
|||||||
|
|
||||||
printf("Type of command: %s || Command: %s \n",type,command);
|
printf("Type of command: %s || Command: %s \n",type,command);
|
||||||
|
|
||||||
free(buf);
|
if(buf) free(buf);
|
||||||
free(type);
|
if(type) free(type);
|
||||||
free(command);
|
if(command) free(command);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,7 @@ unsigned char* jstrescape (unsigned char* pt) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
pt[j++] = '\0';
|
pt[j++] = '\0';
|
||||||
free (ptr);
|
if(ptr) free(ptr);
|
||||||
return (unsigned char*) &pt[0];
|
return (unsigned char*) &pt[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user