The calling function will never see that change to name. Note that the
pointer declared as 'const char* name' is local for the function,
regardless wether it is declared in the parameter list or in the
function body. The memory pointed to by this pointer wasn't modified.
"const" D'OH! I tend to overlook these a lot in the last time.
As for the leak, where is it? I am failing to see it.
There is none. I thought of a leak if you can change the poiner and
the old content stays in memory, unfree'd, if alloc'd. But because
it's a const pointer. Nevermind.