[libvirt] [PATCH] vbox: Prevent from registering storage driver with NULL

Martin Kletzander mkletzan at redhat.com
Mon Nov 3 16:39:44 UTC 2014


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 <mkletzan at 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 at redhat.com
>https://www.redhat.com/mailman/listinfo/libvir-list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20141103/b76797ac/attachment-0001.sig>


More information about the libvir-list mailing list