VirtualBox

Changeset 57464 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Aug 20, 2015 8:07:27 AM (9 years ago)
Author:
vboxsync
Message:

DnDURIList.cpp: Delete formerly allocated file object in error case.

File:
1 edited

Legend:

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

    r57372 r57464  
    6060        if (RTFS_IS_FILE(objInfo.Attr.fMode))
    6161        {
    62             LogFlowFunc(("File '%s' -> '%s' (%RU64)\n", pcszSource, pcszTarget, (uint64_t)objInfo.cbObject));
    63 
    64             DnDURIObject *pObjFile= new DnDURIObject(DnDURIObject::File, pcszSource, pcszTarget);
     62            LogFlowFunc(("File '%s' -> '%s' (%RU64 bytes, file mode 0x%x)\n",
     63                         pcszSource, pcszTarget, (uint64_t)objInfo.cbObject, objInfo.Attr.fMode));
     64
     65            DnDURIObject *pObjFile = new DnDURIObject(DnDURIObject::File, pcszSource, pcszTarget);
    6566            if (pObjFile)
    6667            {
     
    7879                    m_cbTotal += pObjFile->GetSize();
    7980                }
     81                else
     82                    delete pObjFile;
    8083            }
    8184            else
     
    8487        else if (RTFS_IS_DIRECTORY(objInfo.Attr.fMode))
    8588        {
    86             LogFlowFunc(("Directory '%s' -> '%s' \n", pcszSource, pcszTarget));
    87 
    88             DnDURIObject *pObjDir= new DnDURIObject(DnDURIObject::Directory, pcszSource, pcszTarget,
    89                                                     objInfo.Attr.fMode, 0 /* Size */);
     89            LogFlowFunc(("Directory '%s' -> '%s' (file mode 0x%x)\n", pcszSource, pcszTarget, objInfo.Attr.fMode));
     90
     91            DnDURIObject *pObjDir = new DnDURIObject(DnDURIObject::Directory, pcszSource, pcszTarget,
     92                                                     objInfo.Attr.fMode, 0 /* Size */);
    9093            if (pObjDir)
    9194            {
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