VirtualBox

Ignore:
Timestamp:
Nov 22, 2010 6:53:54 PM (14 years ago)
Author:
vboxsync
Message:

USBLib-win: use RTStrFree and play safe

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/VBoxUSB/win/USBLib-win.cpp

    r34264 r34265  
    29192919        if (pDevice)
    29202920        {
    2921             RTMemFree((void *)pDevice->pszAddress);
     2921            RTStrFree((char*)pDevice->pszAddress);
    29222922            RTStrFree(pDevice->pszAltAddress);
    29232923            RTStrFree(pDevice->pszHubName);
    2924             RTMemFree((void *)pDevice->pszManufacturer);
    2925             RTMemFree((void *)pDevice->pszProduct);
    2926             RTMemFree((void *)pDevice->pszSerialNumber);
     2924            RTStrFree((char*)pDevice->pszManufacturer);
     2925            RTStrFree((char*)pDevice->pszProduct);
     2926            RTStrFree((char*)pDevice->pszSerialNumber);
    29272927            RTMemFree(pDevice);
    29282928        }
     
    29852985        PUSBDEVICE pNext = pDevice->pNext;
    29862986
    2987         RTMemFree((void *)pDevice->pszAddress);
    2988         RTMemFree((void *)pDevice->pszManufacturer);
    2989         RTMemFree((void *)pDevice->pszProduct);
    2990         RTMemFree((void *)pDevice->pszSerialNumber);
     2987        RTStrFree((char*)pDevice->pszAddress);
     2988        RTStrFree(pDevice->pszAltAddress);
     2989        RTStrFree(pDevice->pszHubName);
     2990        RTStrFree((char*)pDevice->pszManufacturer);
     2991        RTStrFree((char*)pDevice->pszProduct);
     2992        RTStrFree((char*)pDevice->pszSerialNumber);
    29912993        RTMemFree(pDevice);
    29922994
     
    30003002        if (pDevice)
    30013003        {
    3002             RTMemFree((void *)pDevice->pszAddress);
    3003             RTMemFree((void *)pDevice->pszManufacturer);
    3004             RTMemFree((void *)pDevice->pszProduct);
    3005             RTMemFree((void *)pDevice->pszSerialNumber);
     3004            RTStrFree((char*)pDevice->pszAddress);
     3005            RTStrFree(pDevice->pszAltAddress);
     3006            RTStrFree(pDevice->pszHubName);
     3007            RTStrFree((char*)pDevice->pszManufacturer);
     3008            RTStrFree((char*)pDevice->pszProduct);
     3009            RTStrFree((char*)pDevice->pszSerialNumber);
    30063010            RTMemFree(pDevice);
    30073011        }
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