diff --git a/src/nwfilter/nwfilter_driver.c b/src/nwfilter/nwfilter_driver.c index d25c6f2be09248430c37105fff593159c3e7b2c3..0a4d60546895f8992aee2b8162a20b005669ab82 100644 --- a/src/nwfilter/nwfilter_driver.c +++ b/src/nwfilter/nwfilter_driver.c @@ -174,6 +174,9 @@ nwfilterStateInitialize(bool privileged, char *base = NULL; DBusConnection *sysbus = NULL; + if (!privileged) + return 0; + #if WITH_DBUS if (virDBusHasSystemBus()) sysbus = virDBusGetSystemBus(); @@ -189,9 +192,6 @@ nwfilterStateInitialize(bool privileged, driverState->watchingFirewallD = (sysbus != NULL); driverState->privileged = privileged; - if (!privileged) - return 0; - nwfilterDriverLock(driverState); if (virNWFilterIPAddrMapInit() < 0)