[PATCHv2 1/1] Changes from [v1]:

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

 



- now checked devAlias and making the code more robust in case when qemu stop sending a devAlias

[v1] https://listman.redhat.com/archives/libvir-list/2023-October/242544.html

Signed-off-by: Sergey Mironov <mironov@xxxxxxxxxx>

---
v2: devAlias pointer was checked
---
 src/qemu/qemu_monitor_json.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index 5b9edadcf7..e37faff683 100644
--- a/src/qemu/qemu_monitor_json.c
+++ b/src/qemu/qemu_monitor_json.c
@@ -934,7 +934,7 @@ qemuMonitorJSONHandleTrayChange(qemuMonitor *mon,
     int reason;
 
     /* drive alias is always reported but empty for -blockdev */
-    if (*devAlias == '\0')
+    if (devAlias && *devAlias == '\0')
         devAlias = NULL;
 
     if (!devAlias && !devid) {
-- 
2.31.1





[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]

  Powered by Linux