VirtualBox

Ignore:
Timestamp:
May 25, 2012 7:52:59 AM (13 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
78174
Message:

Additions/SharedFolders: better error handling of VbglR3SharedFolderGetMappings()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxSharedFolders.cpp

    r41442 r41443  
    3636        rc = VbglR3SharedFolderGetMappings(u32ClientId, true /* Only process auto-mounted folders */,
    3737                                           &paMappings, &cMappings);
    38         if (RT_SUCCESS(rc) && cMappings)
     38        if (RT_SUCCESS(rc))
    3939        {
    4040#if 0
     
    122122            }
    123123#endif
    124             RTMemFree(paMappings);
     124            VbglR3SharedFolderFreeMappings(paMappings);
    125125        }
    126         else if (RT_FAILURE(rc))
     126        else
    127127            Log(("VBoxTray: Error while getting the shared folder mappings, rc = %Rrc\n", rc));
    128128        VbglR3SharedFolderDisconnect(u32ClientId);
     
    144144        rc = VbglR3SharedFolderGetMappings(u32ClientId, true /* Only process auto-mounted folders */,
    145145                                           &paMappings, &cMappings);
    146         if (RT_SUCCESS(rc) && cMappings)
     146        if (RT_SUCCESS(rc))
    147147        {
    148148            for (uint32_t i = 0; i < cMappings && RT_SUCCESS(rc); i++)
     
    190190                         paMappings[i].u32Root, rc));
    191191            }
    192             RTMemFree(paMappings);
     192            VbglR3SharedFolderFreeMappings(paMappings);
    193193        }
    194         else if (cMappings)
     194        else
    195195            Log(("VBoxTray: Error while getting the shared folder mappings, rc = %Rrc\n", rc));
    196196        VbglR3SharedFolderDisconnect(u32ClientId);
Note: See TracChangeset for help on using the changeset viewer.

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