Changeset 19388 in vbox
- Timestamp:
- May 5, 2009 4:28:07 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 46897
- Location:
- trunk/src/VBox/HostDrivers
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/Support/SUPDrv.c
r19257 r19388 52 52 # include <iprt/crc32.h> 53 53 # include <iprt/net.h> 54 # include <iprt/string.h> 54 55 #endif 55 56 /* VBox/x86.h not compatible with the Linux kernel sources */ … … 439 440 (PFNRT)RTUuidCompareStr, 440 441 (PFNRT)RTUuidFromStr, 442 (PFNRT)RTStrDup, 443 (PFNRT)RTStrFree, 441 444 NULL 442 445 }; -
trunk/src/VBox/HostDrivers/VBoxNetFlt/solaris/VBoxNetFlt-solaris.c
r19380 r19388 1693 1693 * Strip out PPA from the device name, eg: "ce3". 1694 1694 */ 1695 char *pszDev = RTMemAllocZ(strlen(pThis->szName)); 1696 memcpy(pszDev, pThis->szName, strlen(pThis->szName)); 1695 char *pszDev = RTStrDup(pThis->szName); 1697 1696 char *pszEnd = strchr(pszDev, '\0'); 1698 1697 int PPALen = 0; … … 1704 1703 } 1705 1704 pszEnd++; 1706 1707 char szDev[128];1708 RTStrPrintf(szDev, sizeof(szDev), "/dev/%s", pszDev);1709 RTMemFree(pszDev);1710 1705 1711 1706 int rc; … … 1714 1709 && ddi_strtol(pszEnd, NULL, 10, &PPA) == 0) 1715 1710 { 1716 pszEnd -= PPALen;1717 1711 *pszEnd = '\0'; 1712 char szDev[128]; 1713 RTStrPrintf(szDev, sizeof(szDev), "/dev/%s", pszDev); 1714 1718 1715 /* 1719 1716 * Try open the device as DPLI style 2. … … 1727 1724 rc = dl_attach(pThis->u.s.hIface, (int)PPA, NULL); 1728 1725 if (!rc) 1726 { 1727 RTStrFree(pszDev); 1729 1728 return VINF_SUCCESS; 1729 } 1730 1730 1731 1731 ldi_close(pThis->u.s.hIface, FREAD | FWRITE, kcred); … … 1738 1738 LogRel((DEVICE_NAME ":vboxNetFltSolarisOpenStyle2 Failed to construct PPA.\n")); 1739 1739 1740 RTStrFree(pszDev); 1740 1741 return VERR_INTNET_FLT_IF_FAILED; 1741 1742 }
Note:
See TracChangeset
for help on using the changeset viewer.