VirtualBox

Changeset 85456 in vbox for trunk


Ignore:
Timestamp:
Jul 24, 2020 1:10:47 PM (4 years ago)
Author:
vboxsync
Message:

DnD/DnDDroppedFiles: Init / destruction fixes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/GuestHost/DragAndDrop/DnDDroppedFiles.cpp

    r85433 r85456  
    4242static int dndDroppedFilesInitInternal(PDNDDROPPEDFILES pDF)
    4343{
    44     pDF->m_fOpen = 0;
    45     pDF->m_hDir  = NIL_RTDIR;
     44    pDF->m_fOpen    = 0;
     45    pDF->m_hDir     = NIL_RTDIR;
     46    pDF->pszPathAbs = NULL;
    4647
    4748    RTListInit(&pDF->m_lstDirs);
     
    7172     * directories / files here. */
    7273    dndDroppedFilesCloseInternal(pDF);
     74
     75    RTStrFree(pDF->pszPathAbs);
     76    pDF->pszPathAbs = NULL;
    7377}
    7478
     
    238242            if (RT_SUCCESS(rc))
    239243            {
     244                pDF->pszPathAbs = RTStrDup(szDropDir);
     245                AssertPtrBreakStmt(pDF->pszPathAbs, rc = VERR_NO_MEMORY);
    240246                pDF->m_hDir     = hDir;
    241                 pDF->pszPathAbs = szDropDir;
    242247                pDF->m_fOpen    = fFlags;
    243248            }
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette