mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-25 01:34:11 +03:00
vbox: network: make sure driver is not NULL in virRegisterNetworkDriver
libvirtd will report below error if it does not make sure driver was not NULL in virRegisterNetworkDriver $ libvirtd 2014-10-24 09:24:36.443+0000: 28876: info : libvirt version: 1.2.10 2014-10-24 09:24:36.443+0000: 28876: error : virRegisterNetworkDriver:549 : driver in virRegisterNetworkDriver must not be NULL 2014-10-24 09:24:36.443+0000: 28876: error : virDriverLoadModule:99 : Failed module registration vboxNetworkRegister Signed-off-by: Shanzhi Yu <shyu@redhat.com> Signed-off-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
e8656ce13c
commit
22b185343d
@ -152,7 +152,7 @@ int vboxNetworkRegister(void)
|
||||
if (VBoxCGlueInit(&uVersion) == 0)
|
||||
networkDriver = vboxGetNetworkDriver(uVersion);
|
||||
|
||||
if (virRegisterNetworkDriver(networkDriver) < 0)
|
||||
if (networkDriver && virRegisterNetworkDriver(networkDriver) < 0)
|
||||
return -1;
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user