Otherwise we get a const-ness mismatch when we free the buffer, which for some reason gcc 5.3 didn't notice.