<http://webkit.org/b/66113> [CFNetwork] willCacheResponse() leaks CFCachedURLResponse...
authorddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 Aug 2011 00:52:28 +0000 (00:52 +0000)
committerddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 Aug 2011 00:52:28 +0000 (00:52 +0000)
commit36731f085089fce92fbf8c1e212153dd516d5dbe
tree49e20ab250adc242d4e7a23f3054b3b461e8e4d9
parentccc09e787df63b9feb1c1788e306293ba31c9131
<webkit.org/b/66113> [CFNetwork] willCacheResponse() leaks CFCachedURLResponseRef if delegate changes CacheStoragePolicy

Reviewed by Joseph Pecoraro.

This first appeared in ToT WebKit r23462 (Windows merge).

* platform/network/cf/ResourceHandleCFNet.cpp:
(WebCore::willCacheResponse): Only retain cachedResponse if we
are returning the same object passed into the method, otherwise
we end up double-retaining the new object created.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@92897 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/network/cf/ResourceHandleCFNet.cpp