gVBoxAPI.UArray.handleMachineGetSharedFolders(machine));
if (sharedFolders.count <= 0)
- goto sharedFoldersCleanup;
+ goto cleanup;
if (VIR_ALLOC_N(def->fss, sharedFolders.count) < 0)
- goto sharedFoldersCleanup;
+ goto cleanup;
for (i = 0; i < sharedFolders.count; i++) {
ISharedFolder *sharedFolder = sharedFolders.items[i];
PRBool writable = PR_FALSE;
if (VIR_ALLOC(def->fss[i]) < 0)
- goto sharedFoldersCleanup;
+ goto cleanup;
def->fss[i]->type = VIR_DOMAIN_FS_TYPE_MOUNT;
if (VIR_STRDUP(def->fss[i]->src->path, hostPath) < 0) {
VBOX_UTF8_FREE(hostPath);
VBOX_UTF16_FREE(hostPathUtf16);
- goto sharedFoldersCleanup;
+ goto cleanup;
}
VBOX_UTF8_FREE(hostPath);
VBOX_UTF16_FREE(hostPathUtf16);
if (VIR_STRDUP(def->fss[i]->dst, name) < 0) {
VBOX_UTF8_FREE(name);
VBOX_UTF16_FREE(nameUtf16);
- goto sharedFoldersCleanup;
+ goto cleanup;
}
VBOX_UTF8_FREE(name);
VBOX_UTF16_FREE(nameUtf16);
++def->nfss;
}
- sharedFoldersCleanup:
+ cleanup:
gVBoxAPI.UArray.vboxArrayRelease(&sharedFolders);
}