https://bz.apache.org/ooo/show_bug.cgi?id=127783

[email protected] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Latest|---                         |4.2.0-dev
    Confirmation in|                            |
                 CC|                            |[email protected]

--- Comment #22 from [email protected] ---
Finally found it:

---snip---
8e9316519fe7ab9e74737e9e8cf250d9ecfba643 is the first bad commit
commit 8e9316519fe7ab9e74737e9e8cf250d9ecfba643
Author: Pedro Giffuni <pfg@...>
Date:   Sun Nov 29 20:44:03 2015 +0000

    Resource Leak

    CID:    736452


    git-svn-id: https://svn.apache.org/repos/asf/openoffice/trunk@1717120
13f79535-47bb-0310-9956-ffa450edef68
---snip---

Adding author to CC.

The problem is here:

---snip---
::osl::Module* pLibrary = OpenLibrary( mrMedium.GetFilter()->GetUserData() );
if ( pLibrary )
{
    ImportPPT PPTImport = reinterpret_cast< ImportPPT >(
      pLibrary->getFunctionSymbol(
        ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(   "ImportPPT" ) ) ) );
    if ( PPTImport )
        bRet = PPTImport( aTraceConfigPath, &aConfigData, &mrDocument,
         *pDocStream, *pStorage, mrMedium );

    if ( !bRet )
        mrMedium.SetError( SVSTREAM_WRONGVERSION,
          ::rtl::OUString(
            RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
}
delete pLibrary;
---snip---


The last line, "delete pLibrary", was added by this bad commit, and it deletes
the pLibrary pointer whether it is NULL or not, which will end up doing "delete
NULL" when it's NULL, and crash.

The "delete pLibrary" should probably be at the end of the "if" block just
above it instead.

-- 
You are receiving this mail because:
You are the assignee for the issue.

Reply via email to