Bug 853881 - Follow-up: Avoid double-freeing of DB row. r=me
authorJorg K <jorgk@jorgk.com>
Sat, 22 Apr 2017 23:34:10 +0200
changeset 21458 5c3191edbbd4fe552450b582d520ba9be4cd431b
parent 21457 0a3dcc37ac77b81634f0e1634b8dd098dc94f2df
child 21459 0e469cfeb978ddc6a9e6114b4da3ecedd870ff14
push id13061
push usermozilla@jorgk.com
push dateSat, 22 Apr 2017 21:37:04 +0000
treeherdercomm-central@0e469cfeb978 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme
bugs853881
Bug 853881 - Follow-up: Avoid double-freeing of DB row. r=me
mailnews/db/msgdb/src/nsMsgHdr.cpp
--- a/mailnews/db/msgdb/src/nsMsgHdr.cpp
+++ b/mailnews/db/msgdb/src/nsMsgHdr.cpp
@@ -98,24 +98,18 @@ nsresult nsMsgHdr::InitFlags()
   }
 
   return err;
 
 }
 
 nsMsgHdr::~nsMsgHdr()
 {
-  if (m_mdbRow)
-  {
-    if (m_mdb)
-    {
-      NS_RELEASE(m_mdbRow);
-      m_mdb->RemoveHdrFromUseCache(this, m_messageKey);
-    }
-  }
+  if (m_mdb)
+    m_mdb->RemoveHdrFromUseCache(this, m_messageKey);
   NS_IF_RELEASE(m_mdb);
 }
 
 NS_IMETHODIMP nsMsgHdr::GetMessageKey(nsMsgKey *result)
 {
   if (m_messageKey == nsMsgKey_None && m_mdbRow != nullptr)
   {
     mdbOid outOid;