Which seems to work now,
You are allocating memory, but not freeing it.
Why not use a static array?
char buf[256];
Which seems to work now,
You are allocating memory, but not freeing it.
Why not use a static array?
char buf[256];