[Libreoffice-bugs] [Bug 112254] New: CuiAboutConfigTabPage::InsertEntry leaks memory

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Wed Sep 6 06:54:58 UTC 2017


https://bugs.documentfoundation.org/show_bug.cgi?id=112254

            Bug ID: 112254
           Summary: CuiAboutConfigTabPage::InsertEntry leaks memory
           Product: LibreOffice
           Version: 6.0.0.0.alpha0+ Master
          Hardware: All
                OS: Mac OS X (All)
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: LibreOffice
          Assignee: libreoffice-bugs at lists.freedesktop.org
          Reporter: telesto at surfxs.nl

Description:
CuiAboutConfigTabPage::InsertEntry leaks memory with multiple invocations

Steps to Reproduce:
1. Start the Instruments
2. Choose Memory Leak profile tool
3. Select LibreOffice.app in instdir as target process
4. Click on the record button, LODev is started by the profiling tool
5. Wait for the StartCenter to load.
6. Go to LibreOffceDev -> Preferences 
7. Open LibreOffceDev -> Advanced
8. Open Expert Configuration
10. Close the Writer file without saving.
11. Stop recording.
12. Analyse the profile trace.

Actual Results:  
Memory leak in CuiAboutConfigTabPage::InsertEntry at pEntry->SetUserData( new
UserData(rPropertyPath) );


Expected Results:
Shouldn't leak memory


Reproducible: Always

User Profile Reset: No

Additional Info:
The code pointed to by the profile tool is in optaboutconfig.cxx, Line 213 (
4233 Samples) -> pEntry->SetUserData( new UserData(rPropertyPath)


void CuiAboutConfigTabPage::InsertEntry(const OUString& rPropertyPath, const
OUString& rProp, const OUString& rStatus,
                                        const OUString& rType, const OUString&
rValue, SvTreeListEntry *pParentEntry,
                                        bool bInsertToPrefBox)
{
    SvTreeListEntry* pEntry = new SvTreeListEntry;
    pEntry->AddItem(o3tl::make_unique<SvLBoxContextBmp>(
        Image(), Image(), false)); //It is needed, otherwise causes crash
    pEntry->AddItem(o3tl::make_unique<SvLBoxString>(rProp));
    pEntry->AddItem(o3tl::make_unique<SvLBoxString>(rStatus));
    pEntry->AddItem(o3tl::make_unique<SvLBoxString>(rType));
    pEntry->AddItem(o3tl::make_unique<SvLBoxString>(rValue));
    pEntry->SetUserData( new UserData(rPropertyPath) );

    if(bInsertToPrefBox)
        m_pPrefBox->Insert( pEntry, pParentEntry );
    else
        m_prefBoxEntries.push_back(std::unique_ptr<SvTreeListEntry>(pEntry));


User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4)
AppleWebKit/603.1.29 (KHTML, like Gecko) Version/10.1 Safari/603.1.29

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20170906/1339ea7c/attachment.html>


More information about the Libreoffice-bugs mailing list