static bool
cmdAttachDisk(vshControl *ctl, const vshCmd *cmd)
{
- virDomainPtr dom = NULL;
+ g_autoptr(virshDomain) dom = NULL;
const char *source = NULL;
const char *target = NULL;
const char *driver = NULL;
unsigned int flags = VIR_DOMAIN_AFFECT_CURRENT;
const char *stype = NULL;
g_auto(virBuffer) buf = VIR_BUFFER_INITIALIZER;
- char *xml = NULL;
+ g_autofree char *xml = NULL;
struct stat st;
bool current = vshCommandOptBool(cmd, "current");
bool config = vshCommandOptBool(cmd, "config");
}
cleanup:
- VIR_FREE(xml);
- virshDomainFree(dom);
return functionReturn;
}