Closed Bug 584029 Opened 14 years ago Closed 13 years ago

gfxPlatform::Init leaks fontPrefObserver if !prefs

Categories

(Core :: Graphics, defect)

x86
Windows 7
defect
Not set
trivial

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: timeless, Assigned: timeless)

References

(Blocks 1 open bug, )

Details

(Keywords: coverity, memory-leak)

Attachments

(1 file)

219 gfxPlatform::Init()
280     FontPrefsObserver *fontPrefObserver = new FontPrefsObserver();
282     nsCOMPtr<nsIPrefBranch2> prefs = do_GetService(NS_PREFSERVICE_CONTRACTID);
283     if (prefs) {
287     }

the code should only call new inside the if block...
Attached patch patchSplinter Review
Assignee: nobody → timeless
Status: NEW → ASSIGNED
Attachment #463369 - Flags: review?(bobbyholley+bmo)
Comment on attachment 463369 [details] [diff] [review]
patch

Switching this review to jeff, since he's the new color management owner.
Attachment #463369 - Flags: review?(bobbyholley+bmo) → review?(jmuizelaar)
This code uses mozilla::Preferences now.
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → WORKSFORME
Attachment #463369 - Flags: review?(jmuizelaar)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: