]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: sound: Fix uninitialized model string
authorPeter Krempa <pkrempa@redhat.com>
Mon, 28 Jul 2014 09:38:35 +0000 (11:38 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 28 Jul 2014 09:38:35 +0000 (11:38 +0200)
Commit e5f36698e3efc3d258b2996c7423c47e05ec52b2 introduces a
false-positive build failure in the sound card model handling switch.
Initialize the model to NULL although the value should never be used.

src/qemu/qemu_command.c

index cb3c5847862c4ab8ab16e5cbdd4278a480866a7b..beb8ca80daccbc191bc0ecfed29ff9673d4e2862 100644 (file)
@@ -4674,7 +4674,7 @@ qemuBuildSoundDevStr(virDomainDefPtr def,
                      virQEMUCapsPtr qemuCaps)
 {
     virBuffer buf = VIR_BUFFER_INITIALIZER;
-    const char *model;
+    const char *model = NULL;
 
     /* Hack for devices with different names in QEMU and libvirt */
     switch ((virDomainSoundModel) sound->model) {