On Mon, Nov 03, 2014 at 11:32:41PM +0800, Taowei Luo wrote:
Since 5892944fc853 the virRegisterStorageDriver may be called with
a NULL storageDriver if it failed on vboxGetStorageDriver.
So make sure the storageDriver is not NULL before register.

---
src/vbox/vbox_driver.c |    2 +-
1 file changed, 1 insertion(+), 1 deletion(-)


Already in as commit v1.2.10-3-g55bbc34 that was waiting post release:

commit 55bbc342183a721170be641efac6166bb0cf65d9
Author: Martin Kletzander <mklet...@redhat.com>
Date:   Thu Oct 30 09:56:26 2014 +0100

   vbox: don't register NULL driver

diff --git a/src/vbox/vbox_driver.c b/src/vbox/vbox_driver.c
index c64d2d6..b2e35e9 100644
--- a/src/vbox/vbox_driver.c
+++ b/src/vbox/vbox_driver.c
@@ -74,7 +74,7 @@ int vboxStorageRegister(void)
    if (VBoxCGlueInit(&uVersion) == 0)
        storageDriver = vboxGetStorageDriver(uVersion);

-    if (virRegisterStorageDriver(storageDriver) < 0)
+    if (storageDriver && virRegisterStorageDriver(storageDriver) < 0)
        return -1;
    return 0;
}
--
1.7.9.5

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Attachment: signature.asc
Description: Digital signature

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to