[libvirt PATCH] Fix MinGW pipeline after 49cb59778a4e6c2d04bb9383a9d97fbbc83f9fce

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

 



Signed-off-by: Erik Skultety <eskultet@xxxxxxxxxx>
---
personal pipeline: https://gitlab.com/eskultety/libvirt/-/pipelines/239002989

Pushed under the build breaker rule.


 src/util/virmdev.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/util/virmdev.c b/src/util/virmdev.c
index fc27e9e45d..46db6249de 100644
--- a/src/util/virmdev.c
+++ b/src/util/virmdev.c
@@ -354,7 +354,12 @@ virMediatedDevicePtr
 virMediatedDeviceListSteal(virMediatedDeviceListPtr list,
                            virMediatedDevicePtr dev)
 {
-    int idx = virMediatedDeviceListFindIndex(list, dev->path);
+    int idx = -1;
+
+    if (!dev)
+        return NULL;
+
+    idx = virMediatedDeviceListFindIndex(list, dev->path);
 
     return virMediatedDeviceListStealIndex(list, idx);
 }
-- 
2.29.2




[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