Bug 1246048 - Initialize a variable passed to GetSummaryValid(). The function may return without setting it. r=jorgk a=jorgk
authorISHIKAWA, Chiaki <ishikawa@yk.rim.or.jp>
Sat, 20 Feb 2016 21:33:28 +0100
changeset 26789 e41c21e476da951e0bec3c1f28b9a3eed4b171d5
parent 26788 1e981b3b0cfee63f65e92e8dfb8053962f0ed640
child 26790 89202952b4be7364e24d77d909cd07c26d2bfc8a
push id1850
push userclokep@gmail.com
push dateWed, 08 Mar 2017 19:29:12 +0000
treeherdercomm-esr52@028df196b2d9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjorgk, jorgk
bugs1246048
Bug 1246048 - Initialize a variable passed to GetSummaryValid(). The function may return without setting it. r=jorgk a=jorgk
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;
       }
     }
   }