An error will be reported even if loading partially worked (for example when the system DB could be loaded, but the user DB failed to load). Since the code will still work correctly even if the DB could not be loaded at all, we can ignore the error when DB loading failed. (code still works but virtxml cannot do a lot of useful stuff as it needs an OS and an hypervisor). --- examples/virtxml.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/examples/virtxml.c b/examples/virtxml.c index e577911..09f49cf 100644 --- a/examples/virtxml.c +++ b/examples/virtxml.c @@ -70,14 +70,13 @@ load_osinfo(void) osinfo_loader_process_default_path(loader, &err); if (err) { print_error("Unable to load default libosinfo DB: %s", err->message); - goto cleanup; + g_clear_error(&err); } db = osinfo_loader_get_db(loader); g_object_ref(db); ret = TRUE; -cleanup: g_object_unref(loader); return ret; } -- 1.8.1 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list