Free char buffers each time (fixes segfault)