Summary: | cairo_t* memory leak in GraphicsContext::platformInit | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Brian Stuart <bstuart> | ||||||||
Component: | WebCore Misc. | Assignee: | Nobody <webkit-unassigned> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | bfulgham, dbates, hirano-txb, mrobinson, webkit.review.bot, yoshida-hxa | ||||||||
Priority: | P2 | ||||||||||
Version: | 528+ (Nightly build) | ||||||||||
Hardware: | PC | ||||||||||
OS: | Windows 7 | ||||||||||
URL: | http://smithmicro.com | ||||||||||
Attachments: |
|
Description
Brian Stuart
2012-01-12 15:06:58 PST
Created attachment 169104 [details]
Proposal for fixing the memory leak in WinCairo
Thank you for useful information, Brain.
My team also found same memory leak problem in WinCairo port and
figured out the same bug.
Here is the patch which we made.
We just moved
cairo_destroy(cr);
to the end of the function and added if statement to
make sure that cr is not ZERO for fear that createCairoContextWithHDC
is not called.
Attachment 169104 [details] did not pass style-queue:
Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/platform/graphics/win/Graph..." exit_code: 1
Source/WebCore/platform/graphics/win/GraphicsContextCairoWin.cpp:91: More than one command on the same line in if [whitespace/parens] [4]
Total errors found: 1 in 1 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 173567 [details]
Proposal for fixing the memory leak in WinCairo (Revised patch)
We revised the patch refering the comment sent by BOT.
We just modified its format, no context of program has been changed.
------
Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/platform/graphics/win/Graph..." exit_code: 1
Source/WebCore/platform/graphics/win/GraphicsContextCairoWin.cpp:91: More than one command on the same line in if [whitespace/parens] [4]
Total errors found: 1 in 1 files
------
Comment on attachment 173567 [details]
Proposal for fixing the memory leak in WinCairo (Revised patch)
Nice catch. I think this patch is fine, though there is no ChangeLog entry. Please add a ChangeLog to the patch and I will be happy to approve it. r- because of the missing ChangeLog.
Created attachment 174097 [details]
Proposal for fixing the memory leak in WinCairo (Revised patch v2)
Added ChangeLog.
Comment on attachment 174097 [details] Proposal for fixing the memory leak in WinCairo (Revised patch v2) View in context: https://bugs.webkit.org/attachment.cgi?id=174097&action=review r = me; I will correct the URL ordering and land the change. > Source/WebCore/ChangeLog:3 > + https://bugs.webkit.org/show_bug.cgi?id=76219 We put the bug URL after the short description. Committed r134629: <http://trac.webkit.org/changeset/134629> |