Closed
Bug 678785
Opened 13 years ago
Closed 13 years ago
resource leak (not closed directory) in gfx/thebes/gfxFT2FontList.cpp
Categories
(Core :: Graphics, defect)
Tracking
()
RESOLVED
FIXED
mozilla9
People
(Reporter: david.volgyes, Assigned: atulagrwl)
References
Details
(Whiteboard: [good first bug][mentor=jdm])
Attachments
(1 file, 1 obsolete file)
815 bytes,
patch
|
jtd
:
review+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:5.0) Gecko/20100101 Firefox/5.0 Build ID: 20110622232440 Steps to reproduce: Cppcheck found a resource leak in gfx/thebes/gfxFT2FontList.cpp in gfxFT2FontList::FindFonts() method. Actual results: First of all, I think it's Android specific, because it is in a section wich begins with #elif defined(ANDROID). In line #216 there is this: DIR *d = opendir("/system/fonts"); But nowhere is closed the directory. Expected results: You should close DIR *d, when it is not used anymore. I have attached a proposed fix.
Reporter | ||
Comment 1•13 years ago
|
||
Updated•13 years ago
|
Assignee: nobody → david.volgyes
Component: General → Graphics
Product: Firefox → Core
QA Contact: general → thebes
Updated•13 years ago
|
Attachment #552934 -
Attachment is patch: true
Attachment #552934 -
Flags: review?(jdaggett)
Comment 3•13 years ago
|
||
I think you want to include a null check there, i.e. if (d) { closedir(d); }
Updated•13 years ago
|
Whiteboard: [good first bug] [mentor=jdm]
Reporter | ||
Comment 4•13 years ago
|
||
(In reply to John Daggett (:jtd) from comment #3) > I think you want to include a null check there, i.e. > > if (d) { > closedir(d); > } Definitely. Thanks.
Comment 5•13 years ago
|
||
David, could you post a revised patch so I can review+ it?
Comment 6•13 years ago
|
||
Unassigning from David per his request (bug 679610 comment 4). For anyone looking at this bug, feel free to request it be assigned to you, David has very kindly provided a patch, but will not have time to follow it through.
Assignee: david.volgyes → nobody
Whiteboard: [good first bug] [mentor=jdm] → [good first bug] [mentor=jdm] [has patch, needs new assignee]
Assignee | ||
Comment 7•13 years ago
|
||
Updated the patch
Assignee: nobody → atulagrwl
Attachment #552934 -
Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #552934 -
Flags: review?(jdaggett)
Attachment #557632 -
Flags: review?(jdaggett)
Updated•13 years ago
|
Attachment #557632 -
Flags: review?(jdaggett) → review+
Comment 8•13 years ago
|
||
Checkin?
Updated•13 years ago
|
Keywords: checkin-needed
Updated•13 years ago
|
Keywords: checkin-needed
Whiteboard: [good first bug] [mentor=jdm] [has patch, needs new assignee] → [good first bug][mentor=jdm][inbound]
Comment 9•13 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/120aedf2c84f
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Whiteboard: [good first bug][mentor=jdm][inbound] → [good first bug][mentor=jdm]
Target Milestone: --- → mozilla9
You need to log in
before you can comment on or make changes to this bug.
Description
•