Bug 1268387 - avoid memory leak of ToNewCString(key). r?valentin draft
authorAndi-Bogdan Postelnicu <bogdan.postelnicu@softvision.ro>
Thu, 28 Apr 2016 12:35:58 +0300
changeset 357233 acfd703425124b8a0cb434a2e59a1e20008dce2b
parent 356965 86730d0a82093d705e44f33a34973d28b269f1ea
child 519605 2bdc79b559c9c7437006282f42f8e29d9b5f4f11
push id16737
push userBogdan.Postelnicu@softvision.ro
push dateThu, 28 Apr 2016 09:36:41 +0000
reviewersvalentin
bugs1268387
milestone49.0a1
Bug 1268387 - avoid memory leak of ToNewCString(key). r?valentin MozReview-Commit-ID: L6V7HpKE8KT
netwerk/protocol/http/nsHttpChannel.cpp
--- a/netwerk/protocol/http/nsHttpChannel.cpp
+++ b/netwerk/protocol/http/nsHttpChannel.cpp
@@ -6699,17 +6699,17 @@ nsHttpChannel::ForceCacheEntryValidFor(u
              "for this channel [this=%p].", this));
     } else {
         mCacheEntry->ForceValidFor(aSecondsToTheFuture);
 
         nsAutoCString key;
         mCacheEntry->GetKey(key);
 
         LOG(("nsHttpChannel::ForceCacheEntryValidFor successfully forced valid "
-             "entry with key %s for %d seconds. [this=%p]", ToNewCString(key),
+             "entry with key %s for %d seconds. [this=%p]", key.get(),
              aSecondsToTheFuture, this));
     }
 
     return NS_OK;
 }
 
 //-----------------------------------------------------------------------------
 // nsHttpChannel::nsIResumableChannel