unsigned long bandwidth)
{
virDomainPtr ddomain = NULL;
- char *uri_out = NULL;
- char *cookie = NULL;
- char *dom_xml = NULL;
+ g_autofree char *uri_out = NULL;
+ g_autofree char *cookie = NULL;
+ g_autofree char *dom_xml = NULL;
int cookielen = 0, ret;
virDomainInfo info;
virErrorPtr orig_err = NULL;
ret = dconn->driver->domainMigratePrepare2
(dconn, &cookie, &cookielen, uri, &uri_out, destflags, dname,
bandwidth, dom_xml);
- VIR_FREE(dom_xml);
if (ret == -1)
goto done;
done:
virErrorRestore(&orig_err);
- VIR_FREE(uri_out);
- VIR_FREE(cookie);
return ddomain;
}
unsigned int flags)
{
virDomainPtr ddomain = NULL;
- char *uri_out = NULL;
- char *cookiein = NULL;
- char *cookieout = NULL;
- char *dom_xml = NULL;
+ g_autofree char *uri_out = NULL;
+ g_autofree char *cookiein = NULL;
+ g_autofree char *cookieout = NULL;
+ g_autofree char *dom_xml = NULL;
int cookieinlen = 0;
int cookieoutlen = 0;
int ret;
done:
virErrorRestore(&orig_err);
- VIR_FREE(dom_xml);
- VIR_FREE(uri_out);
- VIR_FREE(cookiein);
- VIR_FREE(cookieout);
virTypedParamsFree(params, nparams);
return ddomain;
}