Fix memory leak on get app name