WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
57366
CoreIPC::decodeResourceError() leaks a CFDataRef
https://bugs.webkit.org/show_bug.cgi?id=57366
Summary
CoreIPC::decodeResourceError() leaks a CFDataRef
Jeff Miller
Reported
2011-03-29 11:22:29 PDT
CoreIPC::decodeResourceError() leaks a CFDataRef
Attachments
Patch
(1.58 KB, patch)
2011-03-29 11:26 PDT
,
Jeff Miller
darin
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Jeff Miller
Comment 1
2011-03-29 11:26:46 PDT
Created
attachment 87374
[details]
Patch
Darin Adler
Comment 2
2011-03-29 11:29:35 PDT
Comment on
attachment 87374
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=87374&action=review
> Source/WebKit2/Shared/win/WebCoreArgumentCodersWin.cpp:149 > - resourceError = WebCore::ResourceError(domain, errorCode, failingURL, localizedDescription, WebCore::copyCertificateToData(certificateChain.first()).leakRef()); > + RetainPtr<CFDataRef> certData = WebCore::copyCertificateToData(certificateChain.first()); > + resourceError = WebCore::ResourceError(domain, errorCode, failingURL, localizedDescription, certData.get());
You could have fixed this by just changing leakRef to get, without adding a local variable. I would have liked that better.
Jeff Miller
Comment 3
2011-03-29 11:46:16 PDT
(In reply to
comment #2
)
> (From update of
attachment 87374
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=87374&action=review
> > > Source/WebKit2/Shared/win/WebCoreArgumentCodersWin.cpp:149 > > - resourceError = WebCore::ResourceError(domain, errorCode, failingURL, localizedDescription, WebCore::copyCertificateToData(certificateChain.first()).leakRef()); > > + RetainPtr<CFDataRef> certData = WebCore::copyCertificateToData(certificateChain.first()); > > + resourceError = WebCore::ResourceError(domain, errorCode, failingURL, localizedDescription, certData.get()); > > You could have fixed this by just changing leakRef to get, without adding a local variable. I would have liked that better.
OK, I will do that instead.
Jeff Miller
Comment 4
2011-03-29 13:11:00 PDT
Committed
r82306
: <
http://trac.webkit.org/changeset/82306
>
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