diff --git a/cpp/test/phonenumbers/fuzz_matcher.cc b/cpp/test/phonenumbers/fuzz_matcher.cc index aaacc57a1..de6f6a104 100644 --- a/cpp/test/phonenumbers/fuzz_matcher.cc +++ b/cpp/test/phonenumbers/fuzz_matcher.cc @@ -13,6 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ #include "phonenumbers/phonenumbermatcher.h" +#include #include #include #include @@ -78,8 +79,9 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { // fuzz the matching with the icu adapter std::string matched_string; i18n::phonenumbers::ICURegExpFactory factory; - i18n::phonenumbers::RegExp* regexp = factory.CreateRegExp(regexp_string); + std::unique_ptr regexp( + factory.CreateRegExp(regexp_string)); regexp->Match(text, full_match, &matched_string); return 0; -} \ No newline at end of file +}