[webkit-reviews] review granted: [Bug 118533] WebResourceCacheManager::cfURLCacheHostNamesWithCallback leaks an array (pointed out by the clang static analyzer) : [Attachment 206395] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jul 10 13:00:52 PDT 2013


Anders Carlsson <andersca at apple.com> has granted Jessie Berlin
<jberlin at webkit.org>'s request for review:
Bug 118533: WebResourceCacheManager::cfURLCacheHostNamesWithCallback leaks an
array (pointed out by the clang static analyzer)
https://bugs.webkit.org/show_bug.cgi?id=118533

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

------- Additional Comments from Anders Carlsson <andersca at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=206395&action=review


>
Source/WebKit2/WebProcess/ResourceCache/cf/WebResourceCacheManagerCFNet.cpp:68
> +	   CFMutableArrayRef hostNames = CFArrayCreateMutableCopy(0, 0,
hostNamesInPersistentStore.get());

I think you can use a RetainPtr here (with adoptCF).

>
Source/WebKit2/WebProcess/ResourceCache/cf/WebResourceCacheManagerCFNet.cpp:71
>	   callback(adoptCF(hostNames));

and then just call std::move(hostNames) here.


More information about the webkit-reviews mailing list