Fix memory issue in test_utils::get_version()