- 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(a)fintech.ru>
---
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