diff --git a/mozilla/profile/pref-migrator/src/nsPrefMigration.cpp b/mozilla/profile/pref-migrator/src/nsPrefMigration.cpp index 22850838b94..197400926ee 100644 --- a/mozilla/profile/pref-migrator/src/nsPrefMigration.cpp +++ b/mozilla/profile/pref-migrator/src/nsPrefMigration.cpp @@ -313,6 +313,9 @@ NS_IMETHODIMP nsPrefMigration::AddProfilePaths(const char * oldProfilePathStr, const char * newProfilePathStr) { MigrateProfileItem* item = new MigrateProfileItem(); + if (!item) + return NS_ERROR_OUT_OF_MEMORY; + item->oldFile = oldProfilePathStr; item->newFile = newProfilePathStr;