diff --git a/frameworks/intl/src/locale_config.cpp b/frameworks/intl/src/locale_config.cpp index f0fd9e2f..22b8ef31 100644 --- a/frameworks/intl/src/locale_config.cpp +++ b/frameworks/intl/src/locale_config.cpp @@ -587,7 +587,9 @@ void LocaleConfig::LoadRegionsLanguages(unordered_set& forbiddenReg reinterpret_cast(FORBIDDEN_LANGUAGES_NAME))) { Split(reinterpret_cast(content), ",", blockedLanguages); } - xmlFree(content); + if (!content) { + xmlFree(content); + } cur = cur->next; } xmlFreeDoc(doc);