Bug 1246048 - Initialize a variable passed to GetSummaryValid(). The function may return without setting it. r=jorgk a=rkent THUNDERBIRD452b1_2016051723_RELBRANCH
authorISHIKAWA, Chiaki <ishikawa@yk.rim.or.jp>
Sat, 20 Feb 2016 21:33:28 +0100
branchTHUNDERBIRD452b1_2016051723_RELBRANCH
changeset 24542 00f00490e3b8fb1d1520fa65053c75c03db1368c
parent 24541 6fef5bf716007a217e32cc9a5ce65acdac99fc4a
child 24543 ad57a8155f4401b7be3e8e934eac95021d182de2
push id1641
push userkent@caspia.com
push dateWed, 18 May 2016 07:34:32 +0000
treeherdercomm-beta@3d73a3597a7e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjorgk, rkent
bugs1246048
Bug 1246048 - Initialize a variable passed to GetSummaryValid(). The function may return without setting it. r=jorgk a=rkent
mailnews/local/src/nsLocalMailFolder.cpp
--- a/mailnews/local/src/nsLocalMailFolder.cpp
+++ b/mailnews/local/src/nsLocalMailFolder.cpp
@@ -3225,17 +3225,17 @@ nsMsgLocalMailFolder::OnStopRunningUrl(n
         }
       }
     }
 
     if (mFlags & nsMsgFolderFlags::Inbox)
     {
       if (mDatabase && mCheckForNewMessagesAfterParsing)
       {
-        bool valid;
+        bool valid = false; // GetSummaryValid may return without setting valid.
         mDatabase->GetSummaryValid(&valid);
         if (valid && msgWindow)
           rv = GetNewMessages(msgWindow, nullptr);
         mCheckForNewMessagesAfterParsing = false;
       }
     }
   }