- Timestamp:
- Oct 27, 2010 11:53:50 AM (14 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Storage/VBoxHDD.cpp
r33464 r33495 2110 2110 RTMemFree(pPluginDirEntry); 2111 2111 pPluginDirEntry = (PRTDIRENTRYEX)RTMemAllocZ(cbPluginDirEntry); 2112 if (!pPluginDirEntry) 2113 { 2114 rc = VERR_NO_MEMORY; 2115 break; 2116 } 2112 2117 /* Retry. */ 2113 2118 rc = RTDirReadEx(pPluginDir, pPluginDirEntry, &cbPluginDirEntry, RTFSOBJATTRADD_NOTHING, RTPATH_F_ON_LINK); … … 2229 2234 RTMemFree(pPluginDirEntry); 2230 2235 pPluginDirEntry = (PRTDIRENTRYEX)RTMemAllocZ(cbPluginDirEntry); 2236 if (!pPluginDirEntry) 2237 { 2238 rc = VERR_NO_MEMORY; 2239 break; 2240 } 2231 2241 /* Retry. */ 2232 2242 rc = RTDirReadEx(pPluginDir, pPluginDirEntry, &cbPluginDirEntry, RTFSOBJATTRADD_NOTHING, RTPATH_F_ON_LINK); -
trunk/src/VBox/Devices/Storage/VHDHDDCore.cpp
r33478 r33495 520 520 /* Update unicode absolute name. */ 521 521 pszTmp = (char*)RTMemTmpAllocZ(cbMaxLen); 522 if (!p vBuf)522 if (!pszTmp) 523 523 { 524 524 rc = VERR_NO_MEMORY; -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageMetrics.cpp
r32718 r33495 45 45 { 46 46 char *newList = (char*)RTMemAlloc(strlen(metricList) + 1); 47 int cSlashes = 0; 48 bool fSkip = false; 49 const char *src = metricList; 50 char c, *dst = newList; 51 while ((c = *src++)) 52 if (c == ':') 53 fSkip = true; 54 else if (c == '/' && ++cSlashes == 2) 55 fSkip = true; 56 else if (c == ',') 57 { 58 fSkip = false; 59 cSlashes = 0; 60 *dst++ = c; 61 } 62 else 63 if (!fSkip) 47 if (newList) 48 { 49 int cSlashes = 0; 50 bool fSkip = false; 51 const char *src = metricList; 52 char c, *dst = newList; 53 while ((c = *src++)) 54 if (c == ':') 55 fSkip = true; 56 else if (c == '/' && ++cSlashes == 2) 57 fSkip = true; 58 else if (c == ',') 59 { 60 fSkip = false; 61 cSlashes = 0; 64 62 *dst++ = c; 65 *dst = 0; 63 } 64 else 65 if (!fSkip) 66 *dst++ = c; 67 *dst = 0; 68 } 66 69 return newList; 67 70 }
Note:
See TracChangeset
for help on using the changeset viewer.