Fix little issues with free and strtok

strtok does not allocate additional memory, it only provides a pointer in memory space.