From: John Ferlan Date: Tue, 5 May 2015 10:53:24 +0000 (-0400) Subject: qemu: Resolve Coverity FORWARD_NULL X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=e7664eedaaa575e94301a5a2d990342b87d7ca5f;p=people%2Fliuw%2Flibxenctrl-split%2Flibvirt.git qemu: Resolve Coverity FORWARD_NULL Coverity points out it was possible to have a zero return from qemuBuildRNGBackendProps thus not filling in 'props' and then causing a NULL dereference on the next call. --- diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index c32d8c61d..68844fa97 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -6464,7 +6464,9 @@ qemuBuildRNGBackendProps(virDomainRNGDefPtr rng, break; case VIR_DOMAIN_RNG_BACKEND_LAST: - break; + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("unknown rng-random backend")); + goto cleanup; } ret = 0;