Closed
Bug 1230939
Opened 9 years ago
Closed 9 years ago
[Static Analysis][Unchecked return value] Function CacheStorageService::DoomStorageEntries from CacheStorageService.cpp
Categories
(Core :: Networking: Cache, defect)
Core
Networking: Cache
Tracking
()
RESOLVED
FIXED
mozilla45
Tracking | Status | |
---|---|---|
firefox45 | --- | fixed |
People
(Reporter: andi, Assigned: andi)
References
(Blocks 1 open bug)
Details
(Keywords: coverity, Whiteboard: CID 1338022)
Attachments
(1 file)
1.22 KB,
patch
|
mayhemer
:
review+
|
Details | Diff | Splinter Review |
The Static Analysis tool Coverity added that the return value from: >> sGlobalEntryTables->Get(aContextKey, &diskEntries); is not checked and later on the succes of the function is checked with the value from diskEntries pointer: >> if (memoryEntries && diskEntries) { In order to silence the analyzer i propose the attached patch.
Assignee | ||
Comment 1•9 years ago
|
||
Hello Patrick, Could you please take a look other this patch. Not only it silences the static analysis tool - Coverity but also i think it adds some performance gain since memoryEntries could be null, sGlobalEntryTables->Get(aContextKey, &diskEntries) will not get called. THX
Attachment #8696463 -
Flags: review?(mcmanus)
Comment 2•9 years ago
|
||
Comment on attachment 8696463 [details] [diff] [review] Bug 1230939.diff Review of attachment 8696463 [details] [diff] [review]: ----------------------------------------------------------------- Stealing from Patrick (hope he doesn't mind) as this is my code. This looks good. Thanks.
Attachment #8696463 -
Flags: review?(mcmanus) → review+
Assignee | ||
Updated•9 years ago
|
Keywords: checkin-needed
Comment 4•9 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/984b095feb49
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
You need to log in
before you can comment on or make changes to this bug.
Description
•