Changeset 97314 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Oct 26, 2022 6:47:49 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxInternalManage.cpp
r97313 r97314 1282 1282 } 1283 1283 1284 static PVDISKRAWPARTDESC appendPartDesc(uint32_t *pcPartDescs, PVDISKRAWPARTDESC *ppPartDescs)1285 {1286 (*pcPartDescs)++;1287 PVDISKRAWPARTDESC p;1288 p = (PVDISKRAWPARTDESC)RTMemRealloc(*ppPartDescs,1289 *pcPartDescs * sizeof(VDISKRAWPARTDESC));1290 *ppPartDescs = p;1291 if (p)1292 {1293 p = p + *pcPartDescs - 1;1294 memset(p, '\0', sizeof(VDISKRAWPARTDESC));1295 }1296 1297 return p;1298 }1299 1300 1284 static const RTGETOPTDEF g_aCreateRawVMDKOptions[] = 1301 1285 { … … 1368 1352 if (!papszNewArgv) 1369 1353 return RTMsgErrorExit(RTEXITCODE_FAILURE, Internal::tr("Failed to allocate memory for argument array")); 1370 size_t cArgs = 0;1354 int cArgs = 0; 1371 1355 1372 1356 papszNewArgv[cArgs++] = RTStrDup("disk"); … … 1374 1358 papszNewArgv[cArgs++] = RTStrDup("--format=VMDK"); 1375 1359 1376 for ( size_t i = 0; i < cArgs; i++)1360 for (int i = 0; i < cArgs; i++) 1377 1361 if (!papszNewArgv[i]) 1378 1362 return RTMsgErrorExit(RTEXITCODE_FAILURE, Internal::tr("Failed to allocate memory for argument array")); … … 1396 1380 RTEXITCODE rcExit = handleCreateMedium(a); 1397 1381 1398 for ( size_t i = 0; i < cArgs; i++)1382 for (int i = 0; i < cArgs; i++) 1399 1383 RTStrFree(papszNewArgv[i]); 1400 1384 RTMemFree(papszNewArgv);
Note:
See TracChangeset
for help on using the changeset viewer.