[Webkit-unassigned] [Bug 65789] New: Leak in CFNetwork Loader RetainPtr<> should Adopt a Copy allocation

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Aug 5 13:57:10 PDT 2011


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

           Summary: Leak in CFNetwork Loader RetainPtr<> should Adopt a
                    Copy allocation
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebCore Misc.
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: joepeck at webkit.org
                CC: psolanki at apple.com


Both of these:

    if (RetainPtr<CFDataRef> bodyData = CFURLRequestCopyHTTPRequestBody(request))
         return FormData::create(CFDataGetBytePtr(bodyData.get()), CFDataGetLength(bodyData.get()));

    if (RetainPtr<CFArrayRef> bodyParts = wkCFURLRequestCopyHTTPRequestBodyParts(request)) {
         RefPtr<FormData> formData = FormData::create();

Cause leaks because RetainPtr::operation= will CFRetain() but FooCopyBar() already returns
a +1 allocation. We should adopt the reference with AdoptCF.

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



More information about the webkit-unassigned mailing list