Changeset 166751 in webkit


Ignore:
Timestamp:
Apr 3, 2014 3:56:47 PM (10 years ago)
Author:
akling@apple.com
Message:

Fix over-retain in SharedBufferCF's createCFData().
<https://webkit.org/b/131139>

Constructing the return type (RetainPtr<CFDataRef>) will also retain
the pointee, so this would end up leaking.

Reviewed by Anders Carlsson.

  • platform/cf/SharedBufferCF.cpp:

(WebCore::SharedBuffer::createCFData):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r166749 r166751  
     12014-04-03  Andreas Kling  <akling@apple.com>
     2
     3        Fix over-retain in SharedBufferCF's createCFData().
     4        <https://webkit.org/b/131139>
     5
     6        Constructing the return type (RetainPtr<CFDataRef>) will also retain
     7        the pointee, so this would end up leaking.
     8
     9        Reviewed by Anders Carlsson.
     10
     11        * platform/cf/SharedBufferCF.cpp:
     12        (WebCore::SharedBuffer::createCFData):
     13
    1142014-04-03  Brent Fulgham  <bfulgham@apple.com>
    215
  • trunk/Source/WebCore/platform/cf/SharedBufferCF.cpp

    r165676 r166751  
    5555RetainPtr<CFDataRef> SharedBuffer::createCFData()
    5656{
    57     if (m_cfData) {
    58         CFRetain(m_cfData.get());
    59         return m_cfData.get();
    60     }
     57    if (m_cfData)
     58        return m_cfData;
    6159
    6260    // Internal data in SharedBuffer can be segmented. We need to get the contiguous buffer.
Note: See TracChangeset for help on using the changeset viewer.