]> xenbits.xensource.com Git - libvirt.git/commitdiff
conf: Don't leak 'ram' video property on error
authorChristophe Fergeau <cfergeau@redhat.com>
Thu, 21 Feb 2013 15:21:31 +0000 (16:21 +0100)
committerChristophe Fergeau <cfergeau@redhat.com>
Fri, 22 Feb 2013 08:31:19 +0000 (09:31 +0100)
It's only freed on normal returns from virDomainVideoDefParseXML,
but not when erroring out.

src/conf/domain_conf.c

index 258ee93705e6a033fb9918a24e6268ae8d624d78..0c75838bcc76ebab914d0bc6a0d17216f52e34f5 100644 (file)
@@ -7736,6 +7736,7 @@ virDomainVideoDefParseXML(const xmlNodePtr node,
 error:
     virDomainVideoDefFree(def);
     VIR_FREE(type);
+    VIR_FREE(ram);
     VIR_FREE(vram);
     VIR_FREE(heads);
     return NULL;