WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 33770
dataFunctionMatrix leaks the array allocated by toArray
https://bugs.webkit.org/show_bug.cgi?id=33770
Summary
dataFunctionMatrix leaks the array allocated by toArray
Mark Rowe (bdash)
Reported
2010-01-17 03:02:29 PST
The call to toArray allocates an array and transfers ownership to the caller. The array is not freed. The interface of toArray seems quite error-prone. Even internally the implementation of toArray looks like it will leak memory when error conditions are hit. It shouldn’t be working with raw pointers that have to be explicitly freed. A Vector<T> seems like a reasonable fit for this sort of data. If it’s not a good fit for some reason, then we have OwnPtr / PassOwnPtr to manage the lifetime of manually-allocated memory.
Attachments
Patch
(7.74 KB, patch)
2010-01-19 16:15 PST
,
Mark Rowe (bdash)
oliver
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Mark Rowe (bdash)
Comment 1
2010-01-18 23:32:04 PST
<
rdar://problem/7555330
>
Mark Rowe (bdash)
Comment 2
2010-01-19 16:15:55 PST
Created
attachment 46958
[details]
Patch
WebKit Review Bot
Comment 3
2010-01-19 16:22:20 PST
Attachment 46958
[details]
did not pass style-queue: Failed to run "WebKitTools/Scripts/check-webkit-style" exit_code: 1 WebCore/bindings/js/JSWebGLRenderingContextCustom.cpp:593: A case label should not be indented, but line up with its switch statement. [whitespace/indent] [4] WebCore/bindings/js/JSWebGLRenderingContextCustom.cpp:641: A case label should not be indented, but line up with its switch statement. [whitespace/indent] [4] WebCore/bindings/js/JSWebGLRenderingContextCustom.cpp:687: A case label should not be indented, but line up with its switch statement. [whitespace/indent] [4] Total errors found: 3 If any of these errors are false positives, please file a bug against check-webkit-style.
Mark Rowe (bdash)
Comment 4
2010-01-19 16:24:08 PST
(In reply to
comment #3
)
>
Attachment 46958
[details]
did not pass style-queue: > > Failed to run "WebKitTools/Scripts/check-webkit-style" exit_code: 1 > WebCore/bindings/js/JSWebGLRenderingContextCustom.cpp:593: A case label should > not be indented, but line up with its switch statement. [whitespace/indent] > [4] > WebCore/bindings/js/JSWebGLRenderingContextCustom.cpp:641: A case label should > not be indented, but line up with its switch statement. [whitespace/indent] > [4] > WebCore/bindings/js/JSWebGLRenderingContextCustom.cpp:687: A case label should > not be indented, but line up with its switch statement. [whitespace/indent] > [4] > Total errors found: 3 > > > If any of these errors are false positives, please file a bug against > check-webkit-style.
I'm not fixing any of these. This code already did a terrible job of matching the style guidelines and fixing it all would result in it being impossible to see the substance of the change.
Oliver Hunt
Comment 5
2010-01-19 16:26:59 PST
Comment on
attachment 46958
[details]
Patch r=me
Mark Rowe (bdash)
Comment 6
2010-01-19 16:59:13 PST
Landed in
r53509
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug