Freeing a const char*? Can you do that? (apparently you can. the compiler just warns).

To avoid the warning, I suggest declaring _buf a char* and explicitly casting buf to non-const. `char* _buf = (char*)buf;` or something like that.