Fixed potential memory leak in test app.