2011-03-29 Jeff Miller <jeffm@apple.com>
authorjeffm@apple.com <jeffm@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 29 Mar 2011 20:10:56 +0000 (20:10 +0000)
committerjeffm@apple.com <jeffm@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 29 Mar 2011 20:10:56 +0000 (20:10 +0000)
        Reviewed by Darin Adler.

        CoreIPC::decodeResourceError() leaks a CFDataRef
        https://bugs.webkit.org/show_bug.cgi?id=57366

        * Shared/win/WebCoreArgumentCodersWin.cpp:
        (CoreIPC::decodeResourceError): Don't leak the result of WebCore::copyCertificateToData(), since the ResourceError will retain it.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@82306 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit2/ChangeLog
Source/WebKit2/Shared/win/WebCoreArgumentCodersWin.cpp

index ad2c0de88c49b2a6ae93297981c7d6e4598e5ee7..6014b43c926a76354f098e6ba24eb9e94cffc94c 100644 (file)
@@ -1,3 +1,13 @@
+2011-03-29  Jeff Miller  <jeffm@apple.com>
+
+        Reviewed by Darin Adler.
+
+        CoreIPC::decodeResourceError() leaks a CFDataRef
+        https://bugs.webkit.org/show_bug.cgi?id=57366
+
+        * Shared/win/WebCoreArgumentCodersWin.cpp:
+        (CoreIPC::decodeResourceError): Don't leak the result of WebCore::copyCertificateToData(), since the ResourceError will retain it.
+
 2011-03-29  Anders Carlsson  <andersca@apple.com>
 
         Reviewed by Sam Weinig.
index f6028060fbef3008399d27a8ce188fe8c74acbc1..d659ac45c80f6a8a8e0bb4dbe25aa88e031d2dce 100644 (file)
@@ -145,7 +145,7 @@ bool decodeResourceError(ArgumentDecoder* decoder, WebCore::ResourceError& resou
     const Vector<PCCERT_CONTEXT> certificateChain = certificate.certificateChain();
     if (!certificateChain.isEmpty()) {
         ASSERT(certificateChain.size() == 1);
-        resourceError = WebCore::ResourceError(domain, errorCode, failingURL, localizedDescription, WebCore::copyCertificateToData(certificateChain.first()).leakRef());
+        resourceError = WebCore::ResourceError(domain, errorCode, failingURL, localizedDescription, WebCore::copyCertificateToData(certificateChain.first()).get());
         return true;
     }
 #endif