Bug 50439

Summary: [chromium] PNG encoder leaks memory on png_write_row errors.
Product: WebKit Reporter: noel gordon <noel.gordon>
Component: CanvasAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, mdelaney7
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Attachments:
Description Flags
patch none

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.