The string you have named d is being returned by the function. Thus it has to make a copy of it (by doing a malloc in sthe String library). So the extra 20-odd bytes taken by the string are still being used (or the copy anyway). Why make a copy anyway? Just get the function to do the println, and skip sending copies of the string everywhere (like your idea which works).
Like I mentioned before, passing strings around by value is only going to give you problems. Nick's plan is the best, but if you have something ELSE going on other than just printing it, the thing to do here is pass in a buffer that you manage externally (or a reference to a string if you must), and have the function copy it down into that buffer.