<?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>57366</bug_id>
          
          <creation_ts>2011-03-29 11:22:29 -0700</creation_ts>
          <short_desc>CoreIPC::decodeResourceError() leaks a CFDataRef</short_desc>
          <delta_ts>2011-03-29 13:11:00 -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>PC</rep_platform>
          <op_sys>Windows 7</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="Jeff Miller">jeffm</reporter>
          <assigned_to name="Jeff Miller">jeffm</assigned_to>
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>375569</commentid>
    <comment_count>0</comment_count>
    <who name="Jeff Miller">jeffm</who>
    <bug_when>2011-03-29 11:22:29 -0700</bug_when>
    <thetext>CoreIPC::decodeResourceError() leaks a CFDataRef</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>375574</commentid>
    <comment_count>1</comment_count>
      <attachid>87374</attachid>
    <who name="Jeff Miller">jeffm</who>
    <bug_when>2011-03-29 11:26:46 -0700</bug_when>
    <thetext>Created attachment 87374
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>375578</commentid>
    <comment_count>2</comment_count>
      <attachid>87374</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2011-03-29 11:29:35 -0700</bug_when>
    <thetext>Comment on attachment 87374
Patch

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

&gt; Source/WebKit2/Shared/win/WebCoreArgumentCodersWin.cpp:149
&gt; -        resourceError = WebCore::ResourceError(domain, errorCode, failingURL, localizedDescription, WebCore::copyCertificateToData(certificateChain.first()).leakRef());
&gt; +        RetainPtr&lt;CFDataRef&gt; certData = WebCore::copyCertificateToData(certificateChain.first());
&gt; +        resourceError = WebCore::ResourceError(domain, errorCode, failingURL, localizedDescription, certData.get());

You could have fixed this by just changing leakRef to get, without adding a local variable. I would have liked that better.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>375603</commentid>
    <comment_count>3</comment_count>
    <who name="Jeff Miller">jeffm</who>
    <bug_when>2011-03-29 11:46:16 -0700</bug_when>
    <thetext>(In reply to comment #2)
&gt; (From update of attachment 87374 [details])
&gt; View in context: https://bugs.webkit.org/attachment.cgi?id=87374&amp;action=review
&gt; 
&gt; &gt; Source/WebKit2/Shared/win/WebCoreArgumentCodersWin.cpp:149
&gt; &gt; -        resourceError = WebCore::ResourceError(domain, errorCode, failingURL, localizedDescription, WebCore::copyCertificateToData(certificateChain.first()).leakRef());
&gt; &gt; +        RetainPtr&lt;CFDataRef&gt; certData = WebCore::copyCertificateToData(certificateChain.first());
&gt; &gt; +        resourceError = WebCore::ResourceError(domain, errorCode, failingURL, localizedDescription, certData.get());
&gt; 
&gt; You could have fixed this by just changing leakRef to get, without adding a local variable. I would have liked that better.

OK, I will do that instead.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>375692</commentid>
    <comment_count>4</comment_count>
    <who name="Jeff Miller">jeffm</who>
    <bug_when>2011-03-29 13:11:00 -0700</bug_when>
    <thetext>Committed r82306: &lt;http://trac.webkit.org/changeset/82306&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>87374</attachid>
            <date>2011-03-29 11:26:46 -0700</date>
            <delta_ts>2011-03-29 11:29:35 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-57366-20110329112645.patch</filename>
            <type>text/plain</type>
            <size>1617</size>
            <attacher name="Jeff Miller">jeffm</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XZWJLaXQyL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBTb3VyY2UvV2Vi
S2l0Mi9DaGFuZ2VMb2cJKHJldmlzaW9uIDgyMjg5KQorKysgU291cmNlL1dlYktpdDIvQ2hhbmdl
TG9nCSh3b3JraW5nIGNvcHkpCkBAIC0xLDMgKzEsMTMgQEAKKzIwMTEtMDMtMjkgIEplZmYgTWls
bGVyICA8amVmZm1AYXBwbGUuY29tPgorCisgICAgICAgIFJldmlld2VkIGJ5IE5PQk9EWSAoT09Q
UyEpLgorCisgICAgICAgIENvcmVJUEM6OmRlY29kZVJlc291cmNlRXJyb3IoKSBsZWFrcyBhIENG
RGF0YVJlZgorICAgICAgICBodHRwczovL2J1Z3Mud2Via2l0Lm9yZy9zaG93X2J1Zy5jZ2k/aWQ9
NTczNjYKKworICAgICAgICAqIFNoYXJlZC93aW4vV2ViQ29yZUFyZ3VtZW50Q29kZXJzV2luLmNw
cDoKKyAgICAgICAgKENvcmVJUEM6OmRlY29kZVJlc291cmNlRXJyb3IpOiBEb24ndCBsZWFrIHRo
ZSByZXN1bHQgb2YgV2ViQ29yZTo6Y29weUNlcnRpZmljYXRlVG9EYXRhKCksIHNpbmNlIHRoZSBS
ZXNvdXJjZUVycm9yIHdpbGwgcmV0YWluIGl0LgorCiAyMDExLTAzLTI4ICBEYXJpbiBBZGxlciAg
PGRhcmluQGFwcGxlLmNvbT4KIAogICAgICAgICBSZXZpZXdlZCBieSBBZGFtIFJvYmVuLgpJbmRl
eDogU291cmNlL1dlYktpdDIvU2hhcmVkL3dpbi9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LCBmYWlsaW5nVVJM
LCBsb2NhbGl6ZWREZXNjcmlwdGlvbiwgY2VydERhdGEuZ2V0KCkpOwogICAgICAgICByZXR1cm4g
dHJ1ZTsKICAgICB9CiAjZW5kaWYK
</data>
<flag name="review"
          id="79798"
          type_id="1"
          status="+"
          setter="darin"
    />
          </attachment>
      

    </bug>

</bugzilla>