mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
* src/virsh.c src/xen_internal.c src/xend_internal.c: memory leaks
fixed by a patch from Masayuki Sunou Daniel
This commit is contained in:
parent
bb5fcd02bc
commit
7b88f59ce4
@ -1,3 +1,8 @@
|
||||
Tue May 29 15:54:17 CEST 2007 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* src/virsh.c src/xen_internal.c src/xend_internal.c: memory leaks
|
||||
fixed by a patch from Masayuki Sunou
|
||||
|
||||
Wed May 23 16:07:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
|
||||
|
||||
* src/virsh.c: Add attach-device and detach-device commands to
|
||||
|
@ -3153,8 +3153,10 @@ vshCommandParse(vshControl * ctl, char *cmdstr)
|
||||
c->def = cmd;
|
||||
c->next = NULL;
|
||||
|
||||
if (!vshCommandCheckOpts(ctl, c))
|
||||
if (!vshCommandCheckOpts(ctl, c)) {
|
||||
if(c) free(c);
|
||||
goto syntaxError;
|
||||
}
|
||||
|
||||
if (!ctl->cmd)
|
||||
ctl->cmd = c;
|
||||
|
@ -1497,11 +1497,15 @@ xenHypervisorInit(void)
|
||||
virXenError(VIR_ERR_XEN_CALL, " ioctl ", IOCTL_PRIVCMD_HYPERCALL);
|
||||
close(fd);
|
||||
in_init = 0;
|
||||
if (ipt)
|
||||
free(ipt);
|
||||
return(-1);
|
||||
|
||||
done:
|
||||
close(fd);
|
||||
in_init = 0;
|
||||
if (ipt)
|
||||
free(ipt);
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
@ -3072,7 +3072,7 @@ xenDaemonCreateLinux(virConnectPtr conn, const char *xmlDesc,
|
||||
static int
|
||||
xenDaemonAttachDevice(virDomainPtr domain, char *xml)
|
||||
{
|
||||
char *sexpr, *conf;
|
||||
char *sexpr, *conf, *str;
|
||||
int hvm = 0, ret;
|
||||
xenUnifiedPrivatePtr priv;
|
||||
|
||||
@ -3084,8 +3084,11 @@ xenDaemonAttachDevice(virDomainPtr domain, char *xml)
|
||||
|
||||
priv = (xenUnifiedPrivatePtr) domain->conn->privateData;
|
||||
|
||||
if (strcmp(virDomainGetOSType(domain), "linux"))
|
||||
str = virDomainGetOSType(domain);
|
||||
if (strcmp(str, "linux"))
|
||||
hvm = 1;
|
||||
if (str)
|
||||
free(str);
|
||||
sexpr = virParseXMLDevice(domain->conn, xml, hvm, priv->xendConfigVersion);
|
||||
if (sexpr == NULL)
|
||||
return (-1);
|
||||
|
Loading…
Reference in New Issue
Block a user