[webkit-reviews] review granted: [Bug 57366] CoreIPC::decodeResourceError() leaks a CFDataRef : [Attachment 87374] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Mar 29 11:29:34 PDT 2011


Darin Adler <darin at apple.com> has granted Jeff Miller <jeffm at apple.com>'s
request for review:
Bug 57366: CoreIPC::decodeResourceError() leaks a CFDataRef
https://bugs.webkit.org/show_bug.cgi?id=57366

Attachment 87374: Patch
https://bugs.webkit.org/attachment.cgi?id=87374&action=review

------- Additional Comments from Darin Adler <darin at apple.com>
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.


More information about the webkit-reviews mailing list