Eliminate kstrdup memory leak