[Webkit-unassigned] [Bug 20377] Leaks on TOT

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Aug 13 17:55:15 PDT 2008


https://bugs.webkit.org/show_bug.cgi?id=20377





------- Comment #1 from eric at webkit.org  2008-08-13 17:55 PDT -------
This would fix it, but an ownptr would be cleaner:

diff --git a/WebCore/xml/XMLHttpRequest.cpp b/WebCore/xml/XMLHttpRequest.cpp
index 072f7fa..af70409 100644
--- a/WebCore/xml/XMLHttpRequest.cpp
+++ b/WebCore/xml/XMLHttpRequest.cpp
@@ -625,8 +625,10 @@ void
XMLHttpRequest::makeCrossSiteAccessRequestWithPreflight(ExceptionCode& ec)
     PreflightResultCache::iterator cacheIt =
preflightResultCache().find(std::make_pair(origin, url));
     if (cacheIt != preflightResultCache().end()) {
         skipPreflight = canSkipPrelight(cacheIt, m_includeCredentials,
m_method, m_requestHeaders);
-        if (!skipPreflight)
+        if (!skipPreflight) {
+            delete *cacheIt;
             preflightResultCache().remove(cacheIt);
+        }
     }

     if (!skipPreflight) {


-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list