Bug 1152364 - crash in Address Book via nsAbBSDirectory::GetChildNodes, r=jcranmer, a=rkent
authorR Kent James <rkent@caspia.com>
Wed, 22 Apr 2015 21:23:25 -0700
changeset 25861 1d64e1aab64239d1684aeae32f265a53d9850bf1
parent 25860 a51d522f9e84c03009aa9fc5414e958251cab584
child 25862 e16fc16337e37c6d8af9db73815c2068eeff248f
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)
reviewersjcranmer, rkent
bugs1152364
Bug 1152364 - crash in Address Book via nsAbBSDirectory::GetChildNodes, r=jcranmer, a=rkent
mailnews/addrbook/src/nsAbManager.cpp
--- a/mailnews/addrbook/src/nsAbManager.cpp
+++ b/mailnews/addrbook/src/nsAbManager.cpp
@@ -241,17 +241,17 @@ NS_IMETHODIMP nsAbManager::GetDirectoryF
     if (NS_FAILED(rv)) {
       NS_WARNING("Unable to select Address book nsAbManager::GetDirectoryFromId()");
       continue;
     }
 
     nsCString dirPrefId;
     directory->GetDirPrefId(dirPrefId);
     if (dirPrefId.Equals(aDirPrefId)) {
-      *aResult = directory;
+      directory.forget(aResult);
       return NS_OK;
     }
   }
 
   return NS_OK;
 }
 
 NS_IMETHODIMP nsAbManager::GetDirectory(const nsACString &aURI,