[libvirt PATCH] Fix MinGW pipeline after 49cb59778a4e6c2d04bb9383a9d97fbbc83f9fce

Signed-off-by: Erik Skultety <eskultet@redhat.com> --- 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

On Fri, Jan 08, 2021 at 12:15:04 +0100, Erik Skultety wrote: Please always describe what you are fixing. The commit message including summary doesn't shed any light what the problem was. Even if it was false positive. Also I'm pretty sure this breaks migw builds even outside of our CI.
Signed-off-by: Erik Skultety <eskultet@redhat.com> --- personal pipeline: https://gitlab.com/eskultety/libvirt/-/pipelines/239002989
Pushed under the build breaker rule.
participants (2)
-
Erik Skultety
-
Peter Krempa