diff --git a/src/e_mod_main.c b/src/e_mod_main.c index 4dd0605..cf4bbff 100644 --- a/src/e_mod_main.c +++ b/src/e_mod_main.c @@ -87,13 +87,15 @@ e_modapi_shutdown(E_Module *m EINA_UNUSED) /* Shutdown gadget */ e_iwd_gadget_shutdown(); - /* Shutdown D-Bus and iwd subsystems */ - iwd_agent_shutdown(); - iwd_dbus_shutdown(); + /* Shutdown iwd subsystems (must happen before D-Bus shutdown) */ iwd_network_shutdown(); iwd_device_shutdown(); iwd_state_shutdown(); + /* Shutdown D-Bus (this frees all proxies and handlers) */ + iwd_agent_shutdown(); + iwd_dbus_shutdown(); + /* Free configuration */ _iwd_config_free(); e_iwd_config_shutdown();