<?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>58004</bug_id>
          
          <creation_ts>2011-04-06 18:35:50 -0700</creation_ts>
          <short_desc>Memory Leak in CoreIPC::decodeResourceError</short_desc>
          <delta_ts>2011-04-07 09:08:11 -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>WebKit2</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>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Saboff">msaboff</reporter>
          <assigned_to name="Michael Saboff">msaboff</assigned_to>
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>381034</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Saboff">msaboff</who>
    <bug_when>2011-04-06 18:35:50 -0700</bug_when>
    <thetext>The local NSError object created in decodeResourceError() has a retain count of 2 when the function exits.  One is needed for the ResourceError reference argument, the other should be released directly or via an autorelease.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>381039</commentid>
    <comment_count>1</comment_count>
      <attachid>88555</attachid>
    <who name="Michael Saboff">msaboff</who>
    <bug_when>2011-04-06 18:41:01 -0700</bug_when>
    <thetext>Created attachment 88555
Patch to wrap NSError allocation with autorelease</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>381040</commentid>
    <comment_count>2</comment_count>
      <attachid>88555</attachid>
    <who name="Maciej Stachowiak">mjs</who>
    <bug_when>2011-04-06 18:46:54 -0700</bug_when>
    <thetext>Comment on attachment 88555
Patch to wrap NSError allocation with autorelease

r=me

(But why autorelease instead of release? Explicit release is usually better.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>381098</commentid>
    <comment_count>3</comment_count>
      <attachid>88555</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2011-04-06 20:37:00 -0700</bug_when>
    <thetext>Comment on attachment 88555
Patch to wrap NSError allocation with autorelease

View in context: https://bugs.webkit.org/attachment.cgi?id=88555&amp;action=review

&gt; Source/WebKit2/Shared/mac/WebCoreArgumentCodersMac.mm:188
&gt; +    NSError *nsError = [[[NSError alloc] initWithDomain:nsString(domain) code:code userInfo:userInfo] autorelease];

A plain old release is much faster than autorelease, so it would be better to do it that way.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>381392</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Saboff">msaboff</who>
    <bug_when>2011-04-07 09:08:11 -0700</bug_when>
    <thetext>Committed r83177: &lt;http://trac.webkit.org/changeset/83177&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>88555</attachid>
            <date>2011-04-06 18:41:01 -0700</date>
            <delta_ts>2011-04-06 20:37:00 -0700</delta_ts>
            <desc>Patch to wrap NSError allocation with autorelease</desc>
            <filename>58004.patch</filename>
            <type>text/plain</type>
            <size>1489</size>
            <attacher name="Michael Saboff">msaboff</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XZWJLaXQyL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBTb3VyY2UvV2Vi
S2l0Mi9DaGFuZ2VMb2cJKHJldmlzaW9uIDgzMTI5KQorKysgU291cmNlL1dlYktp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ya2luZyBjb3B5KQpAQCAtMTg1LDcgKzE4NSw3IEBAIGJvb2wgZGVjb2RlUmVzb3VyY2VF
cnJvcihBcmd1bWVudERlY29kZXIKICAgICBpZiAoY2VydGlmaWNhdGUuY2VydGlmaWNhdGVDaGFp
bigpKQogICAgICAgICBbdXNlckluZm8gc2V0T2JqZWN0OihOU0FycmF5ICopY2VydGlmaWNhdGUu
Y2VydGlmaWNhdGVDaGFpbigpIGZvcktleTpAIk5TRXJyb3JQZWVyQ2VydGlmaWNhdGVDaGFpbktl
eSJdOwogCi0gICAgTlNFcnJvciAqbnNFcnJvciA9IFtbTlNFcnJvciBhbGxvY10gaW5pdFdpdGhE
b21haW46bnNTdHJpbmcoZG9tYWluKSBjb2RlOmNvZGUgdXNlckluZm86dXNlckluZm9dOworICAg
IE5TRXJyb3IgKm5zRXJyb3IgPSBbW1tOU0Vycm9yIGFsbG9jXSBpbml0V2l0aERvbWFpbjpuc1N0
cmluZyhkb21haW4pIGNvZGU6Y29kZSB1c2VySW5mbzp1c2VySW5mb10gYXV0b3JlbGVhc2VdOwog
CiAgICAgcmVzb3VyY2VFcnJvciA9IFJlc291cmNlRXJyb3IobnNFcnJvcik7CiAgICAgcmV0dXJu
IHRydWU7Cg==
</data>
<flag name="review"
          id="81084"
          type_id="1"
          status="+"
          setter="mjs"
    />
          </attachment>
      

    </bug>

</bugzilla>