dao: fix bug - provide a copy of the string in memory, then free it