<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>20377</bug_id>
          
          <creation_ts>2008-08-13 17:54:59 -0700</creation_ts>
          <short_desc>REGRESSION: Leaks on TOT</short_desc>
          <delta_ts>2008-08-25 18:53:05 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>New Bugs</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P1</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Eric Seidel (no email)">eric</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>sam</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>88449</commentid>
    <comment_count>0</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2008-08-13 17:54:59 -0700</bug_when>
    <thetext>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&amp;) | WebCore::SubresourceLoader::didReceiveResponse(WebCore::ResourceResponse const&amp;) | WebCore::XMLHttpRequest::didReceiveResponse(WebCore::SubresourceLoader*, WebCore::ResourceResponse const&amp;) | WebCore::XMLHttpRequest::didReceiveResponsePreflight(WebCore::SubresourceLoader*, WebCore::ResourceResponse const&amp;) | WTF::fastMalloc(unsigned long) | malloc</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88450</commentid>
    <comment_count>1</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2008-08-13 17:55:15 -0700</bug_when>
    <thetext>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&amp; 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) {
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88451</commentid>
    <comment_count>2</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2008-08-13 17:55:37 -0700</bug_when>
    <thetext>http://build.webkit.org/results/trunk-mac-intel-debug/4820/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>89331</commentid>
    <comment_count>3</comment_count>
    <who name="Sam Weinig">sam</who>
    <bug_when>2008-08-25 18:53:05 -0700</bug_when>
    <thetext>Fixed in r35927.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>