int realReadOnlyDisksPathSize = 0;
virVBoxSnapshotConfSnapshotPtr newSnapshotPtr = NULL;
unsigned char snapshotUuid[VIR_UUID_BUFLEN];
+ char **searchResultTab = NULL;
+ ssize_t resultSize = 0;
int it = 0;
int jt = 0;
PRUint32 aMediaSize = 0;
for (it = 0; it < def->dom->ndisks; it++) {
char *location = NULL;
const char *uuidReplacing = NULL;
- char **searchResultTab = NULL;
- ssize_t resultSize = 0;
char *tmp = NULL;
location = def->dom->disks[it]->src->path;
searchResultTab[it],
uuidReplacing);
virStringFreeList(searchResultTab);
+ searchResultTab = NULL;
VIR_FREE(newSnapshotPtr->storageController);
if (!tmp)
goto cleanup;
if (needToChangeStorageController) {
/*We need to append this disk in the storage controller*/
- char **searchResultTab = NULL;
- ssize_t resultSize = 0;
char *tmp = NULL;
resultSize = virStringSearch(snapshotMachineDesc->storageController,
VBOX_UUID_REGEX,
tmp = virStringReplace(snapshotMachineDesc->storageController,
searchResultTab[it],
disk->uuid);
- virStringFreeList(searchResultTab);
VIR_FREE(snapshotMachineDesc->storageController);
if (!tmp)
goto cleanup;
virVBoxSnapshotConfHardDiskPtr disk = NULL;
char *uuid = NULL;
char *format = NULL;
- char **searchResultTab = NULL;
- ssize_t resultSize = 0;
char *tmp = NULL;
vboxIIDUnion iid, parentiid;
tmp = virStringReplace(snapshotMachineDesc->storageController,
searchResultTab[it],
disk->uuid);
- virStringFreeList(searchResultTab);
VIR_FREE(snapshotMachineDesc->storageController);
if (!tmp)
goto cleanup;
VBOX_UTF8_FREE(machineName);
virStringFreeList(realReadOnlyDisksPath);
virStringFreeList(realReadWriteDisksPath);
+ virStringFreeList(searchResultTab);
VIR_FREE(newSnapshotPtr);
VIR_FREE(machineLocationPath);
VIR_FREE(nameTmpUse);
char *settingsFilepath = NULL;
virVBoxSnapshotConfMachinePtr snapshotMachineDesc = NULL;
int isCurrent = -1;
+ char **searchResultTab = NULL;
+ ssize_t resultSize = 0;
int it = 0;
PRUnichar *machineNameUtf16 = NULL;
char *machineName = NULL;
virVBoxSnapshotConfHardDiskPtr disk = NULL;
char *uuid = NULL;
char *format = NULL;
- char **searchResultTab = NULL;
- ssize_t resultSize = 0;
char *tmp = NULL;
vboxIIDUnion iid, parentiid;
resultCodeUnion resultCode;
tmp = virStringReplace(snapshotMachineDesc->storageController,
searchResultTab[it],
disk->uuid);
- virStringFreeList(searchResultTab);
VIR_FREE(snapshotMachineDesc->storageController);
if (!tmp)
goto cleanup;
} else {
for (it = 0; it < def->dom->ndisks; it++) {
const char *uuidRO = NULL;
- char **searchResultTab = NULL;
- ssize_t resultSize = 0;
char *tmp = NULL;
uuidRO = virVBoxSnapshotConfHardDiskUuidByLocation(snapshotMachineDesc,
def->dom->disks[it]->src->path);
tmp = virStringReplace(snapshotMachineDesc->storageController,
searchResultTab[it],
uuidRO);
- virStringFreeList(searchResultTab);
VIR_FREE(snapshotMachineDesc->storageController);
if (!tmp)
goto cleanup;
VBOX_RELEASE(machine);
VBOX_UTF16_FREE(settingsFilePathUtf16);
VBOX_UTF8_FREE(settingsFilepath);
+ virStringFreeList(searchResultTab);
VIR_FREE(snapshotMachineDesc);
VBOX_UTF16_FREE(machineNameUtf16);
VBOX_UTF8_FREE(machineName);