virResetError(&conn->err);
- xmlFreeURI(conn->uri);
+ virURIFree(conn->uri);
virMutexUnlock(&conn->lock);
virMutexDestroy(&conn->lock);
result = 0;
cleanup:
- xmlFreeURI(parsedUri);
+ virURIFree(parsedUri);
esxVI_ObjectContent_Free(&virtualMachine);
esxVI_Event_Free(&eventList);
esxVI_ManagedObjectReference_Free(&task);
if (!tempuri->server || STRPREFIX(tempuri->server, "localhost")) {
virLibConnError(VIR_ERR_INVALID_ARG, __FUNCTION__);
virDispatchError(domain->conn);
- xmlFreeURI(tempuri);
+ virURIFree(tempuri);
return -1;
}
- xmlFreeURI(tempuri);
+ virURIFree(tempuri);
/* Perform the migration. The driver isn't supposed to return
* until the migration is complete.
# viruri.h
virURIFormat;
+virURIFree;
virURIParse;
if (spec.destType == MIGRATION_DEST_FD)
VIR_FORCE_CLOSE(spec.dest.fd.qemu);
- xmlFreeURI(uribits);
+ virURIFree(uribits);
return ret;
}
return ret;
}
+
+
+/**
+ * virURIFree:
+ * @uri: uri to free
+ *
+ * Frees the URI
+ */
+void virURIFree(virURIPtr uri)
+{
+ xmlFreeURI(uri);
+}
virURIPtr virURIParse(const char *uri);
char *virURIFormat(virURIPtr uri);
+void virURIFree(virURIPtr uri);
+
#endif /* __VIR_URI_H__ */
VIR_FREE(fileType);
VIR_FREE(fileName);
VIR_FREE(network_endPoint);
- xmlFreeURI(parsedUri);
+ virURIFree(parsedUri);
return result;
virXendError(VIR_ERR_INVALID_ARG,
"%s", _("xenDaemonDomainMigrate: only xenmigr://"
" migrations are supported by Xen"));
- xmlFreeURI (uriptr);
+ virURIFree (uriptr);
return -1;
}
if (!uriptr->server) {
virXendError(VIR_ERR_INVALID_ARG,
"%s", _("xenDaemonDomainMigrate: a hostname must be"
" specified in the URI"));
- xmlFreeURI (uriptr);
+ virURIFree (uriptr);
return -1;
}
hostname = strdup (uriptr->server);
if (!hostname) {
virReportOOMError();
- xmlFreeURI (uriptr);
+ virURIFree (uriptr);
return -1;
}
if (uriptr->port)
snprintf (port, sizeof port, "%d", uriptr->port);
- xmlFreeURI (uriptr);
+ virURIFree (uriptr);
}
else if ((p = strrchr (uri, ':')) != NULL) { /* "hostname:port" */
int port_nr, n;
ret = 0;
cleanup:
VIR_FREE(uristr);
- xmlFreeURI(uri);
+ virURIFree(uri);
return ret;
}