RESOLVED FIXED 20377
REGRESSION: Leaks on TOT
https://bugs.webkit.org/show_bug.cgi?id=20377
Summary REGRESSION: Leaks on TOT
Eric Seidel (no email)
Reported 2008-08-13 17:54:59 PDT
Leak: 0x173ddf30 size=32 0x1b429650 0x00000040 0x0000003f 0x00000001 P.B.@...?....... 0x00000000 0x00000000 0x08000100 0x00020000 ................ Call stack: [thread 17fffff]: | 0x2 | start | _start | main | dumpRenderTree(int, char const**) | runTestingServerLoop() | runTest(char const*) | -[NSRunLoop runMode:beforeDate:] | CFRunLoopRunInMode | CFRunLoopRunSpecific | _sendCallbacks | -[NSURLConnection(NSURLConnectionInternal) _sendCallbacks] | -[NSURLConnection(NSURLConnectionInternal) _sendDidReceiveResponseCallback] | -[WebCoreResourceHandleAsDelegate connection:didReceiveResponse:] | WebCore::ResourceLoader::didReceiveResponse(WebCore::ResourceHandle*, WebCore::ResourceResponse const&) | WebCore::SubresourceLoader::didReceiveResponse(WebCore::ResourceResponse const&) | WebCore::XMLHttpRequest::didReceiveResponse(WebCore::SubresourceLoader*, WebCore::ResourceResponse const&) | WebCore::XMLHttpRequest::didReceiveResponsePreflight(WebCore::SubresourceLoader*, WebCore::ResourceResponse const&) | WTF::fastMalloc(unsigned long) | malloc
Attachments
Eric Seidel (no email)
Comment 1 2008-08-13 17:55:15 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) {
Eric Seidel (no email)
Comment 2 2008-08-13 17:55:37 PDT
Sam Weinig
Comment 3 2008-08-25 18:53:05 PDT
Fixed in r35927.
Note You need to log in before you can comment on or make changes to this bug.