From: Nikolay Shirokovskiy Date: Tue, 17 Oct 2017 13:56:33 +0000 (+0300) Subject: conf: fix use of uninitialized variable X-Git-Tag: v3.9.0-rc1~128 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=921d61575d6ca7f6242195e7e316904b766da668;p=thirdparty%2Flibvirt.git conf: fix use of uninitialized variable 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. --- diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 516f9fa06e..25d48f9776 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -6188,7 +6188,7 @@ virDomainDeviceBootParseXML(xmlNodePtr node, virHashTablePtr bootHash) { char *order; - char *loadparm; + char *loadparm = NULL; int ret = -1; if (!(order = virXMLPropString(node, "order"))) {