+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
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;
static int
xenDaemonAttachDevice(virDomainPtr domain, char *xml)
{
- char *sexpr, *conf;
+ char *sexpr, *conf, *str;
int hvm = 0, ret;
xenUnifiedPrivatePtr priv;
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);