fix memory leak

free the returned string.