I now see this is freed at the end of the function - then how about using `alloca` instead?