use free for C buffers