[PATCH] qemu: sound: Fix uninitialized model string

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.
---

Notes:
    Pushed under the build-breaker and trivial rules.

 src/qemu/qemu_command.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index cb3c584..beb8ca8 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -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) {
-- 
2.0.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]