[Webkit-unassigned] [Bug 167744] New: Correct memory leak in MediaConstraints

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Feb 2 10:50:46 PST 2017


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

            Bug ID: 167744
           Summary: Correct memory leak in MediaConstraints
    Classification: Unclassified
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: All
                OS: All
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Media Elements
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: bfulgham at webkit.org

Static analysis discovered a memory leak in the handling of ConstraintHolders.

1. ConstraintHolder::create returns a reference to a “new” object.
2. m_variants holds a set of ConstraintHolder objects.
3. m_variants.append(ConstraintHolder::create(…)) copies the returned reference, leaking the new object.

I discussed this with Anders Carlsson, who confirmed that we should just return the object by value here, and return-value-optimization will make sure we efficiently use the memory.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170202/e6afcea1/attachment.html>


More information about the webkit-unassigned mailing list