VirtualBox

Ignore:
Timestamp:
Sep 18, 2015 10:37:37 AM (9 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
102775
Message:

DnD: RTUriPath -> RTUriFilePath; fixed memory leak.

File:
1 edited

Legend:

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

    r57500 r57826  
    255255                                const RTCString &strBaseNew /* = "" */)
    256256{
     257    char *pszPath = RTUriFilePath(strPath.c_str(), URI_FILE_FORMAT_AUTO);
     258    if (!pszPath) /* No URI? */
     259         pszPath = RTStrDup(strPath.c_str());
     260
    257261    int rc;
    258     const char *pszPath = RTUriPath(strPath.c_str());
    259     if (!pszPath)
    260         pszPath = strPath.c_str();
     262
    261263    if (pszPath)
    262264    {
     
    285287                    strPath = RTCString(pszPathURI) + "\r\n";
    286288                    RTStrFree(pszPathURI);
    287 
    288                     rc = VINF_SUCCESS;
    289289                }
    290290                else
     
    296296                rc = VERR_NO_MEMORY;
    297297        }
     298
     299        RTStrFree(pszPath);
    298300    }
    299301    else
    300         rc = VERR_INVALID_PARAMETER;
     302        rc = VERR_NO_MEMORY;
    301303
    302304    return rc;
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