Bug 50439 - [chromium] PNG encoder leaks memory on png_write_row errors.
Summary: [chromium] PNG encoder leaks memory on png_write_row errors.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Canvas (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-02 23:01 PST by noel gordon
Modified: 2010-12-03 00:54 PST (History)
2 users (show)

See Also:


Attachments
patch (4.26 KB, patch)
2010-12-02 23:29 PST, noel gordon
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description noel gordon 2010-12-02 23:01:06 PST
Once the encoder setjmp() is called during initialization, any C++ objects created after that point won't have their destructors called on error due to the way setjmp() unwinds the stack.  So in the error case, the OwnArrayPtr |rowPixels| leaks its memory.
Comment 1 noel gordon 2010-12-02 23:29:07 PST
Created attachment 75467 [details]
patch
Comment 2 WebKit Commit Bot 2010-12-03 00:53:58 PST
Comment on attachment 75467 [details]
patch

Clearing flags on attachment: 75467

Committed r73250: <http://trac.webkit.org/changeset/73250>
Comment 3 WebKit Commit Bot 2010-12-03 00:54:03 PST
All reviewed patches have been landed.  Closing bug.