]> xenbits.xensource.com Git - libvirt.git/commitdiff
xen: Avoid double free of virDomainDef in xenDaemonCreateXML
authorStefan Bader <stefan.bader@canonical.com>
Wed, 31 Jul 2013 09:59:21 +0000 (11:59 +0200)
committerJim Fehlig <jfehlig@suse.com>
Wed, 31 Jul 2013 22:15:56 +0000 (16:15 -0600)
The virDomainDef is allocated by the caller and also used after
calling to xenDaemonCreateXML. So it must not get freed by the
callee.

Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
src/xen/xend_internal.c

index 9d61fcadc64acba6484810a6d4766e1aab70edc6..1ce36e6967f1e5ea4bfde24cb16e241570163de0 100644 (file)
@@ -2171,7 +2171,6 @@ xenDaemonCreateXML(virConnectPtr conn, virDomainDefPtr def)
     if (xenDaemonDomainResume(conn, def) < 0)
         goto error;
 
-    virDomainDefFree(def);
     return 0;
 
   error: