]> xenbits.xensource.com Git - libvirt.git/commitdiff
conf: fix use of uninitialized variable
authorNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
Tue, 17 Oct 2017 13:56:33 +0000 (16:56 +0300)
committerJohn Ferlan <jferlan@redhat.com>
Tue, 17 Oct 2017 19:49:25 +0000 (15:49 -0400)
If same boot order is specified twice (or more) in domain xml
we call free for uninitiaziled loadparm on cleanup in virDomainDeviceBootParseXML
and SIGABRT (or similar) as a result.

src/conf/domain_conf.c

index 516f9fa06e7b1de708051aab2d223ac621c8942a..25d48f977657888617d21032f075b1b1705e2770 100644 (file)
@@ -6188,7 +6188,7 @@ virDomainDeviceBootParseXML(xmlNodePtr node,
                             virHashTablePtr bootHash)
 {
     char *order;
-    char *loadparm;
+    char *loadparm = NULL;
     int ret = -1;
 
     if (!(order = virXMLPropString(node, "order"))) {