Bug 6101 - Leaks in XSLTProcessorImpl due to early exit in failure case
Summary: Leaks in XSLTProcessorImpl due to early exit in failure case
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: XML (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P4 Normal
Assignee: Eric Seidel (no email)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-15 13:33 PST by Eric Seidel (no email)
Modified: 2005-12-29 21:32 PST (History)
0 users

See Also:


Attachments
Proposed patch (1.53 KB, patch)
2005-12-15 13:35 PST, Eric Seidel (no email)
eric: review-
Details | Formatted Diff | Diff
Better fix (3.43 KB, patch)
2005-12-29 20:21 PST, Eric Seidel (no email)
mjs: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Seidel (no email) 2005-12-15 13:33:50 PST
Leaks in XSLTProcessorImpl due to early-exit in failure case

After adding two XSLT processor failure cases to the layout tests last week it's now possible to see a leak 
caused in that code path.  The attached patch closes the leak.
Comment 1 Eric Seidel (no email) 2005-12-15 13:35:09 PST
Created attachment 5099 [details]
Proposed patch
Comment 2 Darin Adler 2005-12-15 21:53:23 PST
Comment on attachment 5099 [details]
Proposed patch

If the sourceDoc comes back 0, should we be returning true or false? This code
returns true. Otherwise, looks fine. I guess I'll say review+.
Comment 3 Eric Seidel (no email) 2005-12-15 22:48:07 PST
Comment on attachment 5099 [details]
Proposed patch

Bah, my bad.  Yeah, it's supposed to return false.  I'll init success to false
instead when landing.
Comment 4 Eric Seidel (no email) 2005-12-19 14:12:54 PST
Comment on attachment 5099 [details]
Proposed patch

This is wrong.	I have a new patch I'll post.
Comment 5 Eric Seidel (no email) 2005-12-29 20:21:54 PST
Created attachment 5367 [details]
Better fix