Bug 57366

Summary: CoreIPC::decodeResourceError() leaks a CFDataRef
Product: WebKit Reporter: Jeff Miller <jeffm>
Component: New BugsAssignee: Jeff Miller <jeffm>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Windows 7   
Attachments:
Description Flags
Patch darin: review+

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+
Jeff Miller
Comment 1 2011-03-29 11:26:46 PDT
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
Note You need to log in before you can comment on or make changes to this bug.