]> xenbits.xensource.com Git - libvirt.git/commitdiff
conf: Initialize 'deflate' for balloon parse XML
authorJohn Ferlan <jferlan@redhat.com>
Wed, 13 Jan 2016 22:01:04 +0000 (17:01 -0500)
committerJohn Ferlan <jferlan@redhat.com>
Thu, 14 Jan 2016 10:54:58 +0000 (05:54 -0500)
Commit id '7bf3198df' neglected to initialize deflate leading to a
possibility if model allocation/checks fail, then the VIR_FREE(deflate)
would be erroneous. Noted by Jan Tomko.

src/conf/domain_conf.c

index 1e78da1cf75c3bc54c8e0945dd337148d64d5225..a9706b076abe0968818853967281ce70c32ab437 100644 (file)
@@ -11354,7 +11354,7 @@ virDomainMemballoonDefParseXML(xmlNodePtr node,
                                unsigned int flags)
 {
     char *model;
-    char *deflate;
+    char *deflate = NULL;
     virDomainMemballoonDefPtr def;
     xmlNodePtr save = ctxt->node;
     unsigned int period = 0;