Closed Bug 1356067 Opened 8 years ago Closed 8 years ago

Possible memory leak in nsUrlClassifierLookupCallback::CompletionV4

Categories

(Toolkit :: Safe Browsing, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: dimi, Assigned: dimi)

Details

(Whiteboard: #sbv4-m6)

Attachments

(1 file)

This is found by Coverty Scan *** CID 1405018: Resource leaks (RESOURCE_LEAK) /toolkit/components/url-classifier/nsUrlClassifierDBService.cpp: 1238 in nsUrlClassifierLookupCallback::CompletionV4(const nsACString &, const nsACString &, unsigned int, nsIArray *)() 1232 result->response.negativeCacheExpirySec = nowSec + aNegativeCacheDuration; 1233 1234 // Fill in positive cache entries. 1235 uint32_t fullHashCount = 0; 1236 nsresult rv = aFullHashes->GetLength(&fullHashCount); 1237 if (NS_FAILED(rv)) { >>> CID 1405018: Resource leaks (RESOURCE_LEAK) >>> Variable "result" going out of scope leaks the storage it points to. 1238 return rv; 1239 } 1240 1241 for (uint32_t i = 0; i < fullHashCount; i++) { 1242 nsCOMPtr<nsIFullHashMatch> match = do_QueryElementAt(aFullHashes, i); 1243
Dimi, do you think it's important enough to put in M6 or can we fix it during M7?
Flags: needinfo?(dlee)
Priority: -- → P2
Whiteboard: #sbv4-m6
(In reply to François Marier [:francois] from comment #1) > Dimi, do you think it's important enough to put in M6 or can we fix it > during M7? It's not so critical because it won't cause memory leak unless aFullHashes->GetLength return error. But I think we can leave it to M6 because it is regression of caching and is not very hard to fix.
Flags: needinfo?(dlee)
Comment on attachment 8857809 [details] Bug 1356067 - Fix memory leak in nsUrlClassifierLookupCallback::CompletionV4. https://reviewboard.mozilla.org/r/129810/#review132730
Attachment #8857809 - Flags: review?(francois) → review+
Pushed by ryanvm@gmail.com: https://hg.mozilla.org/integration/autoland/rev/3c5efe2090ff Fix memory leak in nsUrlClassifierLookupCallback::CompletionV4. r=francois
Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: