Tilghman Lesher wrote: > Why not use ast_strdupa() instead? That's exactly the right thing to use :-) As long as the string copy only needs to live while the function is still on the stack, you're all set. If you need to make a copy and keep it around after the function has exited, then you have to use malloc().