Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(230)

Unified Diff: components/ntp_snippets/ntp_snippets_fetcher.cc

Issue 1965333002: Fix a memory error introduced by issue 1922083004, revealed by the (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/ntp_snippets/ntp_snippets_fetcher.cc
diff --git a/components/ntp_snippets/ntp_snippets_fetcher.cc b/components/ntp_snippets/ntp_snippets_fetcher.cc
index 90c0815a07fc567c7c4715e068af69e5bfc0bd0a..37935e77bc409201435b286dac71497db28ba4b1 100644
--- a/components/ntp_snippets/ntp_snippets_fetcher.cc
+++ b/components/ntp_snippets/ntp_snippets_fetcher.cc
@@ -173,7 +173,7 @@ void NTPSnippetsFetcher::FetchSnippetsFromHosts(
// Translate the BCP 47 |language_code| into a posix locale string.
char locale[ULOC_FULLNAME_CAPACITY];
- UErrorCode error;
+ UErrorCode error = U_ZERO_ERROR;
uloc_forLanguageTag(language_code.c_str(), locale, ULOC_FULLNAME_CAPACITY,
nullptr, &error);
DLOG_IF(WARNING, U_ZERO_ERROR != error)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698